[x265] Some compiler warnings under Linux

Mario Rohkrämer contact at ligh.de
Sat Jul 13 17:21:30 CEST 2019


Forgot to mention: This was v3.1.1+1


Am 13.07.2019, 16:41 Uhr, schrieb Mario *LigH* Rohkrämer <contact at ligh.de>:

> 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
mailto:contact at ligh.de


More information about the x265-devel mailing list