From: Ulrich Drepper Date: Thu, 6 Jan 2005 21:01:25 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.20~10026 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cf53cc2083e0bc77d6d7301fff8c31038a410a2;p=platform%2Fupstream%2Flinaro-glibc.git Update. 2005-01-06 Ulrich Drepper * 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. --- diff --git a/ChangeLog b/ChangeLog index e251cc7..5c62032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-06 Ulrich Drepper + + * 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 * 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 diff --git a/WUR-REPORT b/WUR-REPORT new file mode 100644 index 0000000..a8b2860 --- /dev/null +++ b/WUR-REPORT @@ -0,0 +1,25 @@ +: + +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 + + +: + +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 475cf62..6ac2101 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 001b50b..f15cb57 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); }