masterofeye / libyuv

Automatically exported from code.google.com/p/libyuv
0 stars 0 forks source link

row_common.c: -Wcast-qual warnings #475

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. build with gcc + -Wcast-qual
2.
3.

What is the expected output? What do you see instead?

source/row_common.cc: In function ‘void libyuv::ARGBToRGB565DitherRow_C(const 
uint8*, uint8*, uint32, int)’:
source/row_common.cc:214:45: warning: cast from type ‘const uint32* {aka 
const unsigned int*}’ to type ‘unsigned char*’ casts away qualifiers 
[-Wcast-qual]
     int dither0 = ((unsigned char*)(&dither4))[x & 3];
                                             ^
source/row_common.cc:215:45: warning: cast from type ‘const uint32* {aka 
const unsigned int*}’ to type ‘unsigned char*’ casts away qualifiers 
[-Wcast-qual]
     int dither1 = ((unsigned char*)(&dither4))[(x + 1) & 3];
                                             ^
source/row_common.cc:228:45: warning: cast from type ‘const uint32* {aka 
const unsigned int*}’ to type ‘unsigned char*’ casts away qualifiers 
[-Wcast-qual]
     int dither0 = ((unsigned char*)(&dither4))[(width - 1) & 3];

What version of the product are you using? On what operating system?
gcc-4.8.4; patch attached.

Original issue reported on code.google.com by jz...@google.com on 24 Jul 2015 at 11:50

Attachments:

GoogleCodeExporter commented 8 years ago
For record keeping purposes: this was observed with r1437.

Original comment by jz...@google.com on 25 Jul 2015 at 2:01

GoogleCodeExporter commented 8 years ago
Fixed in r1452

Original comment by fbarch...@chromium.org on 27 Jul 2015 at 6:49