Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 6 Jan 2005 21:01:25 +0000 (21:01 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 6 Jan 2005 21:01:25 +0000 (21:01 +0000)
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.

ChangeLog
WUR-REPORT [new file with mode: 0644]
misc/sys/cdefs.h
posix/regex_internal.c

index e251cc7..5c62032 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
        (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 (file)
index 0000000..a8b2860
--- /dev/null
@@ -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
index 475cf62..6ac2101 100644 (file)
 # 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
index 001b50b..f15cb57 100644 (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);
 }