summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2023-03-18 15:45:43 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-05-07 00:32:24 +0300
commit48b093ba65146dc5bdfe6fffafde26e30b44f8da (patch)
tree9c088e43b767ae811d0d278931aeaf793728753a /src/sna/sna.h
parent003bca926ee13f71f635808d2bc6f4c2c57795b7 (diff)
sna/gen3: Silence compiler warn
../src/sna/kgem_debug_gen3.c:1289:50: warning: ‘%03d’ directive writing between 3 and 10 bytes into a region of size 8 [-Wformat-overflow=] 1289 | sprintf(instr_prefix, "PS%03d", instr); | ^~~~ ../src/sna/kgem_debug_gen3.c:1289:47: note: directive argument in the range [0, 1431655764] 1289 | sprintf(instr_prefix, "PS%03d", instr); | ^~~~~~~~ ../src/sna/kgem_debug_gen3.c:1289:25: note: ‘sprintf’ output between 6 and 13 bytes into a destination of size 10 1289 | sprintf(instr_prefix, "PS%03d", instr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The compiler is utterly wrong here of course since 'instr' will at most be (0x1ff + 2 - 1) / 3 ~= 170 (though the hardware defined max is actually only 123). But let's bump the buffer size a little bit to shut the compiler up. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'src/sna/sna.h')
0 files changed, 0 insertions, 0 deletions