Re: [PATCH 2/2] python: Fix -Wsign-compare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

----- Original Message -----
> The most part of the values are already unsigned values. The exceptions,
> that are causing the warnings, are:
> 
> generated_server_marshallers.c:1387:27: warning: comparison between
> signed and unsigned integer expressions [-Wsign-compare]
>              for (j = 0; j < (((src2->width + 7) / 8 ) * src2->height);
> j++) {
>                            ^
> generated_server_marshallers.c:1411:27: warning: comparison between
> signed and unsigned integer expressions [-Wsign-compare]
>              for (j = 0; j < (((4 * src2->width + 7) / 8 ) *
> src2->height); j++) {
>                            ^
> generated_server_marshallers.c:1435:27: warning: comparison between
> signed and unsigned integer expressions [-Wsign-compare]
>              for (j = 0; j < (src2->width * src2->height); j++) {
> 
> And those cannot be negative.

Ah, could we instead cast the result of get_array_size() for the image type arrays ?
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]