Re: [Patch] Minor GCC documentation correction for -Wformat-overflow

2018-02-14 Thread Martin Sebor
On 02/14/2018 02:28 PM, Indu Bhagat wrote: In section "-Wformat-overflow=1", following is stated : void f (int a, int b) { char buf [12]; sprintf (buf, "a = %i, b = %i\n", a, b); } " Increasing the size of the buffer by a single byte is sufficient to avoid the warning," [size of an

[Patch] Minor GCC documentation correction for -Wformat-overflow

2018-02-14 Thread Indu Bhagat
In section "-Wformat-overflow=1", following is stated : void f (int a, int b) { char buf [12]; sprintf (buf, "a = %i, b = %i\n", a, b); } " Increasing the size of the buffer by a single byte is sufficient to avoid the warning," [size of an unknown int for the purpose of this warning is = 1