warning fixes for BCC and OW (heavily modified patch 819146)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1302,7 +1302,6 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
{
|
||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||
hist3d histogram = cquantize->histogram;
|
||||
int i;
|
||||
|
||||
if (is_pre_scan) {
|
||||
/* Set up method pointers */
|
||||
@@ -1314,9 +1313,6 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
cquantize->pub.color_quantize = pass2_fs_dither;
|
||||
cquantize->pub.finish_pass = finish_pass2;
|
||||
|
||||
/* Make sure color count is acceptable */
|
||||
i = cinfo->actual_number_of_colors;
|
||||
|
||||
{
|
||||
size_t arraysize = (size_t) ((cinfo->output_width + 2) *
|
||||
(3 * sizeof(FSERROR)));
|
||||
@@ -1334,7 +1330,7 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
}
|
||||
/* Zero the histogram or inverse color map, if necessary */
|
||||
if (cquantize->needs_zeroed) {
|
||||
for (i = 0; i < HIST_C0_ELEMS; i++) {
|
||||
for (int i = 0; i < HIST_C0_ELEMS; i++) {
|
||||
memset((void *) histogram[i], 0,
|
||||
HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell));
|
||||
}
|
||||
@@ -1510,8 +1506,6 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest,
|
||||
|
||||
{
|
||||
int i;
|
||||
int w = src.GetWidth();
|
||||
int h = src.GetHeight();
|
||||
|
||||
int windowsSystemColourCount = 20;
|
||||
|
||||
@@ -1529,8 +1523,9 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest,
|
||||
#endif
|
||||
|
||||
// create rows info:
|
||||
int h = src.GetHeight();
|
||||
int w = src.GetWidth();
|
||||
unsigned char **rows = new unsigned char *[h];
|
||||
h = src.GetHeight(), w = src.GetWidth();
|
||||
unsigned char *imgdt = src.GetData();
|
||||
for (i = 0; i < h; i++)
|
||||
rows[i] = imgdt + 3/*RGB*/ * w * i;
|
||||
|
Reference in New Issue
Block a user