Closed Bug 802484 Opened 14 years ago Closed 14 years ago

image/decoders/nsPNGDecoder.cpp:586:11: warning: variable ‘alpha_bits’ set but not used [-Wunused-but-set-variable]

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 744686

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Reporting build warning: { image/decoders/nsPNGDecoder.cpp: In static member function ‘static void mozilla::image::nsPNGDecoder::info_callback(png_structp, png_infop)’: image/decoders/nsPNGDecoder.cpp:586:11: warning: variable ‘alpha_bits’ set but not used [-Wunused-but-set-variable] } For this chunk of code ======== 582 /*---------------------------------------------------------------*/ 583 /* copy PNG info into imagelib structs (formerly png_set_dims()) */ 584 /*---------------------------------------------------------------*/ 585 586 int32_t alpha_bits = 1; 587 588 if (channels == 2 || channels == 4) { [...] 594 if ((trans[i] != 0) && (trans[i] != 255)) { 595 alpha_bits = 8; [...] 600 } else { 601 alpha_bits = 8; 602 } 603 } ======== https://mxr.mozilla.org/mozilla-central/source/image/decoders/nsPNGDecoder.cpp#582 We do a bunch of work there to figure out "alpha_bits", and then we don't actually use that value. Might be a bug. Or just dead code.
Blocks: buildwarning
Oh, bug 744686 is filed on this and just hasn't landed yet. duping.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.