Skip to content

Commit 6e990d4

Browse files
pszymichgfxbot
authored andcommitted
Enable Wformat and Wformat-security by default
Change-Id: I2b46a3717dd778fea056d203b3ab68a1dcb23816
1 parent b053669 commit 6e990d4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

IGC/AdaptorOCL/OCL/Patch/patch_parser.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2525
======================= end_copyright_notice ==================================*/
2626

2727
#include <exception>
28+
#include <cinttypes>
2829
#include "../../3d/common/iStdLib/iStdLib.h"
2930
#include "IGC/common/igc_debug.h"
3031
#include "IGC/common/igc_regkeys.hpp"
@@ -57,7 +58,7 @@ void DebugKernelBinaryHeader_Gen7(
5758
{
5859
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "Gen7 Kernel Binary Header:\n" );
5960
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tCheckSum = %x\n", pHeader->CheckSum );
60-
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tShaderHashCode = %llx\n", pHeader->ShaderHashCode );
61+
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tShaderHashCode = %" PRIu64 "\n", pHeader->ShaderHashCode );
6162
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tKernelNameSize = %d\n", pHeader->KernelNameSize );
6263
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tPatchListSize = %d\n", pHeader->PatchListSize );
6364
ICBE_DPF_STR( output, GFXDBG_HARDWARE, "\tKernelHeapSize = %d\n", pHeader->KernelHeapSize );
@@ -1356,7 +1357,7 @@ void DebugPatchList(
13561357
"\tGlobalBufferIndex = %d\n",
13571358
pPatchItem->GlobalBufferIndex);
13581359
ICBE_DPF_STR( output, GFXDBG_HARDWARE,
1359-
"\tGlobalPointerOffset = %llu\n",
1360+
"\tGlobalPointerOffset = %" PRIu64 "\n",
13601361
pPatchItem->GlobalPointerOffset);
13611362
ICBE_DPF_STR( output, GFXDBG_HARDWARE,
13621363
"\tBufferType = %d\n",
@@ -1380,7 +1381,7 @@ void DebugPatchList(
13801381
"\tConstantBufferIndex = %d\n",
13811382
pPatchItem->ConstantBufferIndex);
13821383
ICBE_DPF_STR( output, GFXDBG_HARDWARE,
1383-
"\tConstantPointerOffset = %llu\n",
1384+
"\tConstantPointerOffset = %" PRIu64 "\n",
13841385
pPatchItem->ConstantPointerOffset);
13851386
ICBE_DPF_STR( output, GFXDBG_HARDWARE,
13861387
"\tBufferType = %d\n",

IGC/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,8 +2794,8 @@ foreach(_compilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
27942794
-Wno-enum-compare
27952795
-Wno-type-limits
27962796
-Wno-ignored-qualifiers
2797-
-Wno-format
2798-
-Wno-format-security
2797+
-Wformat
2798+
-Wformat-security
27992799
-Wno-extra
28002800
-Wno-write-strings
28012801
-finline
@@ -2816,8 +2816,6 @@ foreach(_compilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
28162816
PATTERN "${IGC_BUILD__RELEASE_PATTERN}"
28172817
SET_RAW
28182818
-D_FORTIFY_SOURCE=2
2819-
-Wformat
2820-
-Wformat-security
28212819
-fstack-protector
28222820
)
28232821
if(_igc_compiler_is_gnu OR (_igc_compiler_is_clang AND NOT CMAKE_C_COMPILER_VERSION LESS "4.0"))

0 commit comments

Comments
 (0)