Mailinglist Archive: opensuse-buildservice (93 mails)

< Previous Next >
[opensuse-buildservice] Re: Disable an error that is not (I am fairly certain) an error
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
<roger.oberholtzer@xxxxxxxxx> wrote:

On Mon, Jul 15, 2019 at 9:31 PM Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:

On Jul 15 2019, Roger Oberholtzer <roger.oberholtzer@xxxxxxxxx> 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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >