This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PING][PATCH][BZ #18265] Updated __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp
- From: Daniel Marjamäki <Daniel dot Marjamaki at evidente dot se>
- To: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Wed, 27 May 2015 11:00:00 +0000
- Subject: [PING][PATCH][BZ #18265] Updated __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp
- Authentication-results: sourceware.org; auth=none
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
diff --git a/ChangeLog b/ChangeLog
index ba7a400..a2b6eb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>.
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 0d68cda..10c1b5f 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.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