From patchwork Wed Apr 1 08:09:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Marjam=C3=A4ki?= X-Patchwork-Id: 5943 Received: (qmail 69827 invoked by alias); 1 Apr 2015 08:09:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 69812 invoked by uid 89); 1 Apr 2015 08:09:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=ham version=3.3.2 X-HELO: EX01.evidente.local From: =?iso-8859-1?Q?Daniel_Marjam=E4ki?= To: "libc-alpha@sourceware.org" Subject: nonnull annotations Date: Wed, 1 Apr 2015 08:09:42 +0000 Message-ID: MIME-Version: 1.0 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 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,