[BZ,#18265] Updated __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp
Commit Message
Hello!
This patch adds __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp.
These added annotations match the annoations for strcat, strncat, strcmp, strncmp in glibc.
For information, I have completed the "copyright assignment form for glibc".
Best regards,
Daniel Marjamäki
..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden
Mobile: +46 (0)709 12 42 62
E-mail: Daniel.Marjamaki@evidente.se
www.evidente.se
Comments
On 22 May 2015 08:00, Daniel Marjamäki wrote:
> This patch adds __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp.
>
> These added annotations match the annoations for strcat, strncat, strcmp, strncmp in glibc.
thanks, now that glibc-2.23 is open, i've merged your patch
-mike
@@ -1,3 +1,11 @@
+2015-05-22 Daniel Marjamäki <daniel.marjamaki@evidente.se>
+
+ [BZ #18265]
+ * wcsmbs/wchar.h (wcscat): Add __nonnull attribute.
+ (wcsncat): Likewise.
+ (wcscmp): Likewise.
+ (wcsncmp): Likewise.
+
2015-05-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Include <libc-internal.h>.
@@ -155,18 +155,19 @@ extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
/* Append SRC onto DEST. */
extern wchar_t *wcscat (wchar_t *__restrict __dest,
- const wchar_t *__restrict __src) __THROW;
+ const wchar_t *__restrict __src)
+ __THROW __nonnull ((1, 2));
/* Append no more than N wide-characters of SRC onto DEST. */
extern wchar_t *wcsncat (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
- __THROW;
+ __THROW __nonnull ((1, 2));
/* Compare S1 and S2. */
extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
- __THROW __attribute_pure__;
+ __THROW __attribute_pure__ __nonnull ((1, 2));
/* Compare N wide-characters of S1 and S2. */
extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
- __THROW __attribute_pure__;
+ __THROW __attribute_pure__ __nonnull ((1, 2));
__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8