From 8553bab241a62fd7e473b273cf8a9662c9dec2e6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 11 Nov 2016 20:17:35 +0100 Subject: [PATCH] Ignoring overzealous GCC warnings (#883) --- imgui.cpp | 1 + imgui_demo.cpp | 1 + imgui_draw.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index bb9623064..28e1c4c3d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -650,6 +650,7 @@ #pragma GCC diagnostic ignored "-Wformat" // warning: format '%p' expects argument of type 'void*', but argument 6 has type 'ImGuiWindow*' #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value +#pragma GCC diagnostic ignored "-Wcast-qual" // warning: cast from type 'xxxx' to type 'xxxx' casts away qualifiers #endif //------------------------------------------------------------------------- diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 9263673cc..ba624b2a0 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -38,6 +38,7 @@ #pragma GCC diagnostic ignored "-Wformat-security" // warning : format string is not a string literal (potentially insecure) #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value +#pragma GCC diagnostic ignored "-Wmisleading-indentation" // warning: this 'if' clause does not guard this statement #endif // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. diff --git a/imgui_draw.cpp b/imgui_draw.cpp index a60748016..a660e30c5 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -46,6 +46,7 @@ #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value +#pragma GCC diagnostic ignored "-Wcast-qual" // warning: cast from type 'xxxx' to type 'xxxx' casts away qualifiers #endif //-------------------------------------------------------------------------