Jiri Slaby 32cd33bd19 util: mkimage, fix gcc5 build failure
gcc5 reports:
../util/mkimage.c: In function 'grub_install_get_image_target':
../util/mkimage.c:954:5: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations]
     && j < ARRAY_SIZE (image_targets[i].names); j++)
     ^
../util/mkimage.c:953:39: note: possible undefined statement is here
      for (j = 0; image_targets[i].names[j]
                                        ^

Well, let's move the index 'j' test before accesing the array to:
1) make the loop obvious
2) make gcc happy

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2015-02-12 22:18:01 +03:00
..
2010-09-15 14:46:53 +02:00
2013-12-21 13:47:27 +01:00
2015-01-27 17:17:58 +01:00
2015-01-30 22:45:58 +03:00
2013-11-07 06:35:50 +01:00
2015-01-26 09:56:24 +01:00
2015-01-30 22:57:39 +03:00