nonnull annotations

Message ID CA180F4D0C023044AA10FB1BDCAC4D1F01610F35@EX01.evidente.local
State Superseded
Headers

Commit Message

Daniel Marjamäki April 1, 2015, 8:09 a.m. UTC
  Hello!

I would like to contribute more annotations to glibc.

I attach a patch in this email for wcscpy and wcsncpy.

Let me know if this looks good. I can provide more similar patches for other functions.

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

Mike Frysinger April 1, 2015, 8:22 p.m. UTC | #1
On 01 Apr 2015 08:09, Daniel Marjamäki wrote:
> Let me know if this looks good. I can provide more similar patches for other functions.

looks good to me.  could you include ChangeLog entries in your e-mail bodies ?

the entire process is covered here:
	https://sourceware.org/glibc/wiki/Contribution%20checklist
-mike
  

Patch

diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 9652f65..2866bec 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -145,11 +145,12 @@  __USING_NAMESPACE_STD(tm)
 __BEGIN_NAMESPACE_STD
 /* Copy SRC to DEST.  */
 extern wchar_t *wcscpy (wchar_t *__restrict __dest,
-			const wchar_t *__restrict __src) __THROW;
+			const wchar_t *__restrict __src)
+     __THROW __nonnull ((1, 2));
 /* Copy no more than N wide-characters of SRC to DEST.  */
 extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
 			 const wchar_t *__restrict __src, size_t __n)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Append SRC onto DEST.  */
 extern wchar_t *wcscat (wchar_t *__restrict __dest,