summaryrefslogtreecommitdiff
path: root/src/Fl_BMP_Image.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-12-13 15:51:54 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-12-13 15:51:54 +0100
commitb82ea16d69aa794e9f8daf36f30d57c8c53dab19 (patch)
tree00f6563a2c2d9a0b8069cfe599b93b6dd908edb2 /src/Fl_BMP_Image.cxx
parent0e3acd27fbe7c02bc68f7fbf7b663b2469e10ffa (diff)
Fix compiler warning [-Wmaybe-uninitialized]
Fl_BMP_Image.cxx:228:30: warning: ‘width’ may be used uninitialized in this function 228 | int maskSize = (((width*Bpp+3)&~3)*height) + ... | ~~~~~^~~~
Diffstat (limited to 'src/Fl_BMP_Image.cxx')
-rw-r--r--src/Fl_BMP_Image.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_BMP_Image.cxx b/src/Fl_BMP_Image.cxx
index 7610652cb..95a467a3a 100644
--- a/src/Fl_BMP_Image.cxx
+++ b/src/Fl_BMP_Image.cxx
@@ -205,7 +205,8 @@ void Fl_BMP_Image::load_bmp_(Fl_Image_Reader &rdr, int ico_height, int ico_width
height = ico_height;
} else {
// New BMP header...
- w(rdr.read_long());
+ width = rdr.read_long();
+ w(width);
// If the height is negative, the row order is flipped
temp = rdr.read_long();
if (temp < 0) row_order = 1;