2005-01-06  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h: Define __wur.
	* libio/stdio.h: Use __wur for a number of interfaces.
	* posix/unistd.h: Likewise.

	* posix/regex_internal.c (free_state): Free word_trtable.
This commit is contained in:
Ulrich Drepper 2005-01-06 21:01:25 +00:00
parent bb803bff5c
commit 5cf53cc208
4 changed files with 41 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-01-06 Ulrich Drepper <drepper@redhat.com>
* misc/sys/cdefs.h: Define __wur.
* libio/stdio.h: Use __wur for a number of interfaces.
* posix/unistd.h: Likewise.
2004-12-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Use
@ -342,6 +348,7 @@
(transit_state): Expect state->trtable to be a 256-item
transition table. Reorganize code to have less tests in
the common case, and to save an indentation level.
* posix/regex_internal.c (free_state): Free word_trtable.
2004-12-21 Jakub Jelinek <jakub@redhat.com>

25
WUR-REPORT Normal file
View File

@ -0,0 +1,25 @@
<unistd.h>:
lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
the descriptor is fine.
lseek64: same
setuid: will always succeed given correct privileges, so there might
be places which don't check for it.
setreuid: same
seteuid: same
setgid: same
setregid: same
setegid: same
setresuid: same
setresgid: same
<stdio.h>:
setvbuf: if stream and buffer are fine and other parameters constant,
it cannot really fail.
fseek: see lseek
fseeko: likewise
fgetpos: similarly
fsetpos: likewise

View File

@ -255,6 +255,14 @@
# define __nonnull(params)
#endif
/* If fortification mode, we warn about unused results of certain
function calls which can lead to problems. */
#if __GNUC_PREREQ (3,4) && __USE_FORTIFY_LEVEL > 0
# define __wur __attribute__ ((__warn_unused_result__))
#else
# define __wur /* Ignore */
#endif
/* It is possible to compile containing GCC extensions even if GCC is
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before

View File

@ -1668,6 +1668,7 @@ free_state (state)
re_free (state->entrance_nodes);
}
re_node_set_free (&state->nodes);
re_free (state->word_trtable);
re_free (state->trtable);
re_free (state);
}