Ah, looks like this is really strange. Note that gcc6.3.1 -O2 -Wall does not warn this, perhaps because gcc has optimized out as "both" variable is always 0 or so.
I guess the attached patch is what is really intended.
Ah, assembler code generated by compiler shows that
gcc6.3.1 -O2 -Wall just uses uninitialized "theme" value
On the other hand, clang-3.8.1 -O2 -Wall warns this, and after that clang optimizes out uninitialized "theme" and "both", and assume that "both" is always 0.
Anyway the code needs fixing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, looks like this is really strange. Note that gcc6.3.1 -O2 -Wall does not warn this, perhaps because gcc has optimized out as "both" variable is always 0 or so.
I guess the attached patch is what is really intended.
Ah, assembler code generated by compiler shows that
Anyway the code needs fixing.
Actually this causes lxappeance segfault when trying to remove icon theme. Forwarded: https://github.com/lxde/lxappearance/pull/4