[opensuse-buildservice] Disable an error that is not (I am fairly certain) an error
I am trying to build a package in OBS (https://build.opensuse.org/package/show/home:rogeroberholtzer/blt30). On a couple platforms, the build fails as shown here: [ 185s] ... running 50-check-gcc-output [ 185s] ... testing for serious compiler warnings [ 185s] (using /usr/lib/build/checks-data/check_gcc_output) [ 185s] (using //.build.log) [ 185s] [ 185s] I: Statement might potentially overflow a destination buffer, where a size larger [ 185s] than the actual buffer was specified [ 185s] E: blt3 destbufferoverflow bltPictCmd.c:2432:9 I have checked the code, and I do not think the error is correct. An array of structures is defined. This storage is passed to a function that copies that amount of the same structures into the memory. I think it is some new gcc test that is broken on the platforms that fail. Since I cannot patch something that is not actually broken, how can I disable this test from being fatal to the build. It is not fatal to the compile. It is some later test that obs does that fails. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Jul 15 2019, Roger Oberholtzer
I have checked the code, and I do not think the error is correct. An array of structures is defined. This storage is passed to a function that copies that amount of the same structures into the memory. I think it is some new gcc test that is broken on the platforms that fail.
Nope, the compiler is always right. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mon, Jul 15, 2019 at 9:31 PM Andreas Schwab
On Jul 15 2019, Roger Oberholtzer
wrote: I have checked the code, and I do not think the error is correct. An array of structures is defined. This storage is passed to a function that copies that amount of the same structures into the memory. I think it is some new gcc test that is broken on the platforms that fail.
Nope, the compiler is always right.
Seriously? The compiler as a compiler is not complaining. Some new tests that gcc can do these days is what is failing. Or at least triggering a failure by OBS. Something of a fixed compile-time size is declared. A pointer to this is passed to a function that copies (memcpy - no null terminators or such) exactly that amount of data into that storage. The complaint that the storage is not big enough seems incorrect. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Darn. I see the issue. It's not my code. So to me the fix is not obvious.
Calling code:
Blt_Pixel colors[256];
Blt_GetPaletteColors(instPtr->painter, drawable, colors);
Function called:
Blt_GetPaletteColors(Painter *p, Drawable drawable, Blt_Pixel *colors)
{
memcpy(colors, p->palette, sizeof(Blt_Picture) * 256);
}
Blt_Pixel vs Blt_Picture.
I almost missed that.
On Mon, Jul 15, 2019 at 9:38 PM Roger Oberholtzer
On Mon, Jul 15, 2019 at 9:31 PM Andreas Schwab
wrote: On Jul 15 2019, Roger Oberholtzer
wrote: I have checked the code, and I do not think the error is correct. An array of structures is defined. This storage is passed to a function that copies that amount of the same structures into the memory. I think it is some new gcc test that is broken on the platforms that fail.
Nope, the compiler is always right.
Seriously? The compiler as a compiler is not complaining. Some new tests that gcc can do these days is what is failing. Or at least triggering a failure by OBS.
Something of a fixed compile-time size is declared. A pointer to this is passed to a function that copies (memcpy - no null terminators or such) exactly that amount of data into that storage. The complaint that the storage is not big enough seems incorrect.
-- Roger Oberholtzer
-- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Andreas Schwab
-
Roger Oberholtzer