Fix PR#13268 - modf arguments

Andreas Jaeger aj@suse.com
Wed Oct 12 13:11:00 GMT 2011


modf* expects a non-null pointer as second argument, let's tell GCC about it.

Andreas

2011-10-12  Andreas Jaeger  <aj@suse.de>

	[BZ#13268]
	* math/bits/mathcalls.h: Mark argument 2 of modf as non-null.

diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index 64da627..4f22abf 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -1,5 +1,5 @@
 /* Prototype declarations for math functions; helper file for <math.h>.
-   Copyright (C) 1996-2002, 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1996-2002, 2003, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -113,7 +113,8 @@ __MATHCALL (log,, (_Mdouble_ __x));
 __MATHCALL (log10,, (_Mdouble_ __x));
 
 /* Break VALUE into integral and fractional parts.  */
-__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
+__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr))
+     __attribute__ ((__nonnull__ (2)));
 _Mdouble_END_NAMESPACE
 
 #ifdef __USE_GNU

-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20111012/1fb77aa1/attachment.bin>


More information about the Libc-alpha mailing list