Skip to content

Commit

Permalink
Add __wur to GNU version of strerror_r.
Browse files Browse the repository at this point in the history
Not using the result of the GNU strerror_r() is always a mistake.

Moreover this would generate warning if XSI version was expected but GNU
version was used instead (because some random used header defined
_GNU_SOURCE which was Python.h in this case).
  • Loading branch information
Cyril Hrubis authored and Andreas Jaeger committed Jun 15, 2012
1 parent 49bdf4c commit a3aeac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2012-06-15 Cyril Hrubis <metan@ucw.cz>

* string/string.h: Add __wur to GNU version of strerror_r.

2012-06-14 H.J. Lu <hongjiu.lu@intel.com>

[BZ #14229]
Expand Down
5 changes: 2 additions & 3 deletions string/string.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* Copyright (C) 1991-1993,1995-2004,2007,2009,2010,2012
Free Software Foundation, Inc.
/* Copyright (C) 1991-2012 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
Expand Down Expand Up @@ -433,7 +432,7 @@ extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be
used. */
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
__THROW __nonnull ((2));
__THROW __nonnull ((2)) __wur;
# endif
#endif

Expand Down

0 comments on commit a3aeac4

Please sign in to comment.