Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Jan 6, 2005
1 parent bb803bf commit 5cf53cc
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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>

Expand Down
25 changes: 25 additions & 0 deletions WUR-REPORT
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions misc/sys/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions posix/regex_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 5cf53cc

Please sign in to comment.