diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-12-12 17:48:39 +0000 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-12-12 17:48:39 +0000 |
commit | e66ba879d163f9e58eca843f4669616cc49c2f66 (patch) | |
tree | bc4ecba0b44fcdb500af24c6ae2df2b4a42709e1 /tools/libxl/Makefile | |
parent | 966e43d7ad9c5feb6beab487955264516140052d (diff) | |
download | xen-e66ba879d163f9e58eca843f4669616cc49c2f66.tar.gz xen-e66ba879d163f9e58eca843f4669616cc49c2f66.tar.bz2 xen-e66ba879d163f9e58eca843f4669616cc49c2f66.zip |
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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/Makefile')
-rw-r--r-- | tools/libxl/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index 7a0c03c7bb..70c9c1cfe9 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -11,7 +11,8 @@ MINOR = 0 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) |