Warning fixes
In trying to eliminate all compiler warnings on all CI builds (so we can enable even stricter warnings and ultimately enable -Werrror), this fixes all MinGW32 warnings along with !219 (merged)
There were a lot of case statement fallthrough warnings. This uses __attribute__((fallthrough))
for cases which are explicit fallthroughs. However... seems like a really rubbish optimisation. Why not use a simple for
loop and let the compiler use loop unrolling... Could be eliminated entirely. Others are missing a break
statement. Ostensibly because the usage()
function never returns, but that's not a great reason for breaking basic good practice. It doesn't hurt to add them in.
And there's a single unused variable warning. Only happens if both JPEG and ZIP features are not enabled.