glibc/catgets
Joseph Myers 0538372096 Fix -Wempty-body warnings in glibc.
One group of warnings seen building glibc with -Wextra is -Wempty-body
warnings about an 'if' body (or in one case an 'else' body) that is
just a semicolon, "warning: suggest braces around empty body in an
'if' statement [-Wempty-body]" - I think the point of the warning
being to make it more visible whether an 'if' body is actually present
or not.

This patch fixes such warnings in glibc.  There's one place, with a
semicolon at the end of a comment, where this is clearly making the
presence of an 'else' body more visible.  The other cases involve
macro definitions expanding to nothing.  While there's no issue there
with visibility at the call sites, I think it's still cleaner to have
a macro that expands to something nonempty appropriate for the context
- so do {} while (0) if it's only intended to be usable as a
statement, or ((void) 0) where the macro definition is an alternative
to a call to a function returning void, so this patch makes those
changes.

Tested for x86_64.

	* catgets/gencat.c (normalize_line): Use braces around empty
	'else' body.
	* include/stap-probe.h [!USE_STAP_PROBE && !__ASSEMBLER__]
	(STAP_PROBE0): Use do {} while (0) for do-nothing definition.
	[!USE_STAP_PROBE && !__ASSEMBLER__] (STAP_PROBE1): Likewise.
	[!USE_STAP_PROBE && !__ASSEMBLER__] (STAP_PROBE2): Likewise.
	[!USE_STAP_PROBE && !__ASSEMBLER__] (STAP_PROBE3): Likewise.
	[!USE_STAP_PROBE && !__ASSEMBLER__] (STAP_PROBE4): Likewise.
	* libio/libio.h (_IO_funlockfile): Use ((void) 0) for do-nothing
	definition.
2019-02-13 13:50:13 +00:00
..
catgets.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
catgetsinfo.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
config.h Fri Apr 19 00:49:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> 1996-04-20 00:05:25 +00:00
Depend Update. 2000-09-07 03:49:56 +00:00
gencat.c Fix -Wempty-body warnings in glibc. 2019-02-13 13:50:13 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nl_types.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
open_catalog.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sample.SJIS Update. 2002-06-29 21:08:13 +00:00
test1.msg Update. 1998-10-30 19:17:59 +00:00
test2.msg Update. 2003-02-22 23:19:31 +00:00
test-gencat.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
test-gencat.sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-catgets.c Fix building glibc master with NDEBUG and --with-cpu. 2016-03-15 23:23:24 -04:00
Versions Update. 2002-02-01 23:24:05 +00:00
xopen-msg.awk Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00