[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: permit declaration after statement
# HG changeset patch # User Ian Jackson <ian.jackson@xxxxxxxxxxxxx> # Date 1323712119 0 # Node ID 92e1b36d23485fe03e55e100ec8d030f3e8bc969 # Parent af0b77d8b1c386ced51689bea253dc6014f0eea5 libxl: permit declaration after statement GCC and C99 allow declarations to be mixed with code. This is a good idea because: * It allows variables to be more often initialised as they are declared, thus reducing the occurrence of uninitialised variable errors. * Certain alloca-like constructs (arrays allocated at runtime on the stack) can more often be written without a spurious { } block. Such blocks are confusing to read. * It makes it easier to write and use macros which declare and initialise formulaic variables and do other function setup code, because there is no need to worry that such macros might be incompatible with each other or have strict ordering constraints. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- diff -r af0b77d8b1c3 -r 92e1b36d2348 tools/libxl/Makefile --- a/tools/libxl/Makefile Mon Dec 12 17:48:39 2011 +0000 +++ b/tools/libxl/Makefile Mon Dec 12 17:48:39 2011 +0000 @@ -11,7 +11,8 @@ XLUMAJOR = 1.0 XLUMINOR = 0 -CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations +CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ + -Wno-declaration-after-statement CFLAGS += -I. -fPIC ifeq ($(CONFIG_Linux),y) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |