mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
compiler_gcc: do not redefine __gnu_attributes
gcc allows extensions to be non compiler specific by defining __* macros for the attributes supported by gcc. Having a different definition causes many warnings during the build (cdefs.h on FreeBSD uses __attribute((__pure__)) where u-boot uses __attribute__((pure)) for example). Do not redefine these macros to suppress these warnings. This patch ignores the checkpatch warning: WARNING: __packed is preferred over __attribute__((packed)) Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
This commit is contained in:
parent
dc19ec11d7
commit
7ea50d5284
2 changed files with 12 additions and 4 deletions
|
@ -12,7 +12,9 @@
|
|||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
|
||||
#define __always_inline inline __attribute__((always_inline))
|
||||
#ifndef __always_inline
|
||||
# define __always_inline inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A trick to suppress uninitialized variable warning without generating any
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue