Remove clang warnings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Alexey Kopytov | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Low
|
Alexey Kopytov |
Bug Description
When building PS 5.5 with clang I get numerous warnings like this one:
/Users/
expanded from macro 'STRUCT_FLD'
#define STRUCT_FLD(name, value) name: value
/Users/
use of GNU old-style field designator extension [-Wgnu-designator]
The fix is:
@@ -168,7 +168,7 @@
} \
} while (0)
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER && !defined __clang__
#define STRUCT_FLD(name, value) name: value
#else
#define STRUCT_FLD(name, value) value
Related branches
- Vlad Lesin (community): Approve (g2)
-
Diff: 13 lines (+2/-1)1 file modifiedPercona-Server/storage/innobase/handler/i_s.cc (+2/-1)
I would also add (if possible) another ifdef around following pragma:
/home/raghavend ra/repo/ percona- server/ 5.5/Percona- Server/ sql/item_ xmlfunc. h +25:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma interface /* gcc class implementation */
This is how it looks currently:
#ifdef __GNUC__
#pragma interface /* gcc class implementation */
#endif
it can be made
#ifdef __GNUC__ && !defined __clang__
#pragma interface /* gcc class implementation */
#endif