Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qt: Suppress warnings in qt backend build
This patch fixes majorly 2 kinds of warning issues: (1) cc1plus: warning: command line option '-Wold-style-definition' is valid for Ada/C/ObjC but not for C++ [enabled by default] cc1plus: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default] cc1plus: warning: command line option '-Wnested-externs' is valid for C/ObjC but not for C++ [enabled by default] cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default] cc1plus: warning: command line option '-Wmissing-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default] cc1plus: warning: command line option '-Wbad-function-cast' is valid for C/ObjC but not for C++ [enabled by default] Solution: Enable these warnings only for C compiler and not for C++ (2) cairo-qt-surface.cpp: In function 'cairo_int_status_t _cairo_qt_surface_fill(void*, cairo_operator_t, const cairo_pattern_t*, const cairo_path_fixed_t*, cairo_fill_rule_t, double, cairo_antialias_t, const cairo_clip_t*)': cairo-qt-surface.cpp:852:5: warning: inlining failed in call to 'PatternToBrushConverter::PatternToBrushConverter(const cairo_pattern_t*)': --param max-inline-insns-single limit reached [-Winline] cairo-qt-surface.cpp:1339:38: warning: called from here [-Winline] cairo-qt-surface.cpp:390:1: warning: inlining failed in call to 'QPainterPath _ZL10path_to_qtPK17_cairo_path_fixedPK13_cairo_matrix.part.13()': call is unlikely and code size would grow [-Winline] cairo-qt-surface.cpp:1306:1: warning: called from here [-Winline] cairo-qt-surface.cpp:1051:5: warning: inlining failed in call to 'PatternToBrushConverter::~PatternToBrushConverter()': call is unlikely and code size would grow [-Winline] Solution: Add __attribute__ ((noinline)) to the function as mentioned in http://stackoverflow.com/questions/11724235/warning-for-template-with-g-o2-or-os-o-o1 (Edit 3) Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
- Loading branch information