iso8601_difference(): incorrect nonnull attribute
iso8601_difference was incorrectly marked as having all of its attributes required to be non-null, but this is not the case according to the docs or the implementation. This was causing a crash as the compiled library was taking advantage of the nonnull notation to remove some tests against null which, according to the docs, are actually required. Fix by tightening the nonnull specification to those parameters which actually require it.
This commit is contained in:
parent
ed05b5c872
commit
cd9a2d252a
|
@ -148,7 +148,7 @@ stored in \a sign (if it is not a null pointer), i.e. -1 if \a d2 > \a d1 or
|
||||||
void iso8601_difference(const struct iso8601_date* d1,
|
void iso8601_difference(const struct iso8601_date* d1,
|
||||||
const struct iso8601_date* d2, struct iso8601_elapsed* per, int* sign)
|
const struct iso8601_date* d2, struct iso8601_elapsed* per, int* sign)
|
||||||
#ifndef DOXYGEN
|
#ifndef DOXYGEN
|
||||||
__attribute__((nonnull))
|
__attribute__((nonnull(1,2)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue