This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PING][PATCH][BZ #18265] Updated __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]