kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=7dc59c88f892764ee2af57c586525598c87f10c4
commit 7dc59c88f892764ee2af57c586525598c87f10c4 Author: Kim Woelders <k...@woelders.dk> Date: Fri Mar 9 21:13:46 2018 +0100 BMP loader: Fix warnings found with -O3 --- src/modules/loaders/loader_bmp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/loaders/loader_bmp.c b/src/modules/loaders/loader_bmp.c index 3fcc17e..d7c8ba8 100644 --- a/src/modules/loaders/loader_bmp.c +++ b/src/modules/loaders/loader_bmp.c @@ -156,6 +156,8 @@ load(ImlibImage * im, ImlibProgressFunction progress, return 0; } + offset = 0; + headSize = 0; fseek(f, 8, SEEK_CUR); ReadleLong(f, &offset); ReadleLong(f, &headSize); @@ -164,8 +166,13 @@ load(ImlibImage * im, ImlibProgressFunction progress, fclose(f); return 0; } + + w = h = 0; + bitcount = 0; + comp = BI_RGB; if (headSize == 12) { + tmpShort = 0; ReadleShort(f, &tmpShort); w = tmpShort; ReadleShort(f, &tmpShort); @@ -173,7 +180,6 @@ load(ImlibImage * im, ImlibProgressFunction progress, ReadleShort(f, &planes); ReadleShort(f, &bitcount); imgsize = size - offset; - comp = BI_RGB; } else if (headSize == 40) { --