diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | WUR-REPORT | 25 | ||||
-rw-r--r-- | misc/sys/cdefs.h | 8 | ||||
-rw-r--r-- | posix/regex_internal.c | 1 |
4 files changed, 41 insertions, 0 deletions
@@ -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> diff --git a/WUR-REPORT b/WUR-REPORT new file mode 100644 index 0000000000..a8b28607d5 --- /dev/null +++ b/WUR-REPORT @@ -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 diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 475cf62961..6ac21013cc 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -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 diff --git a/posix/regex_internal.c b/posix/regex_internal.c index 001b50b134..f15cb575eb 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -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); } |