Message ID | 20190327231100.29043-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] compiler: Disable BUILD_MESSAGE() when processing with sparse. | expand |
On 28 Mar 2019, at 01:11, Ben Pfaff <blp@ovn.org<mailto:blp@ovn.org>> wrote: sparse doesn't support _Pragma(message(x)), even though GCC does, so HAVE_PRAGMA_MESSAGE is deceptive in that case and causes pointless errors. Signed-off-by: Ben Pfaff <blp@ovn.org<mailto:blp@ovn.org>> --- lib/compiler.h | 4 ++— Acked-by: Alin Gabriel Serdean <aserdean@ovn.org<mailto:aserdean@ovn.org>>
On Wed, Apr 03, 2019 at 12:11:05PM +0000, Alin Serdean wrote: > > > On 28 Mar 2019, at 01:11, Ben Pfaff <blp@ovn.org<mailto:blp@ovn.org>> wrote: > > sparse doesn't support _Pragma(message(x)), even though GCC does, so > HAVE_PRAGMA_MESSAGE is deceptive in that case and causes pointless errors. > > Signed-off-by: Ben Pfaff <blp@ovn.org<mailto:blp@ovn.org>> > --- > lib/compiler.h | 4 ++— > > Acked-by: Alin Gabriel Serdean <aserdean@ovn.org<mailto:aserdean@ovn.org>> Thanks, applied to master.
diff --git a/lib/compiler.h b/lib/compiler.h index 9e44d46d7137..03af47a03563 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ /* Output a message (not an error) while compiling without failing the * compilation process */ -#if HAVE_PRAGMA_MESSAGE +#if HAVE_PRAGMA_MESSAGE && !__CHECKER__ #define DO_PRAGMA(x) _Pragma(#x) #define BUILD_MESSAGE(x) \ DO_PRAGMA(message(x))
sparse doesn't support _Pragma(message(x)), even though GCC does, so HAVE_PRAGMA_MESSAGE is deceptive in that case and causes pointless errors. Signed-off-by: Ben Pfaff <blp@ovn.org> --- lib/compiler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)