[x265] Some compiler warnings under Linux
Mario *LigH* Rohkrämer
contact at ligh.de
Sat Jul 13 16:41:57 CEST 2019
Ubuntu 18.04 LTS + GCC 9.0
/home/ligh/x265/source/encoder/ratecontrol.cpp: In member function ‘int
x265::RateControl::writeRateControlFrameStats(x265::Frame*,
x265::RateControlEntry*)’:
/home/ligh/x265/source/encoder/ratecontrol.cpp:2867:21: warning: passing
argument 1 to restrict-qualified parameter aliases with argument 3
[-Wrestrict]
2867 | sprintf(deltaPOC, "%s%d~", deltaPOC,
rpsWriter->deltaPOC[i]);
| ^~~~~~~~ ~~~~~~~~
/home/ligh/x265/source/encoder/ratecontrol.cpp:2868:21: warning: passing
argument 1 to restrict-qualified parameter aliases with argument 3
[-Wrestrict]
2868 | sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
| ^~~~~ ~~~~~
/home/ligh/x265/source/encoder/ratecontrol.cpp:2867:36: warning: ‘~’
directive writing 1 byte into a region of size between 0 and 127
[-Wformat-overflow=]
2867 | sprintf(deltaPOC, "%s%d~", deltaPOC,
rpsWriter->deltaPOC[i]);
| ^
/home/ligh/x265/source/encoder/ratecontrol.cpp:2867:20: note: ‘sprintf’
output between 3 and 140 bytes into a destination of size 128
2867 | sprintf(deltaPOC, "%s%d~", deltaPOC,
rpsWriter->deltaPOC[i]);
|
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ligh/x265/source/encoder/ratecontrol.cpp:2868:33: warning: ‘~’
directive writing 1 byte into a region of size between 0 and 39
[-Wformat-overflow=]
2868 | sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
| ^
/home/ligh/x265/source/encoder/ratecontrol.cpp:2868:20: note: ‘sprintf’
output between 3 and 42 bytes into a destination of size 40
2868 | sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Fun and success!
Mario *LigH* Rohkrämer
maito:contact at ligh.de
More information about the x265-devel
mailing list