berarma / ffbtools

Set of tools for FFB testing and debugging on GNU/Linux
GNU General Public License v3.0
61 stars 10 forks source link

Simplify Makefile and fix warnings #23

Closed sambazley closed 3 years ago

sambazley commented 3 years ago

This pull request simplifies the Makefile, enables -Wextra, and fixes the subsequent warnings. It also fixes an error preventing ffbplay from compiling with the default CFLAGS on Arch.

Can you verify that the return values on src/ffbplay.c:212 and src/ffbplay.c:233 are correct, and that src/ffbplay.c:601 is supposed to fall through.

berarma commented 3 years ago

The new return values are no worse than what we had. I wrote this fast without thinking very much about the user interface or error checking since I targetted developers and tinkerers more than final users. I would keep your changes and leave further improvements for the future.

The fall through is intentional. I guess we should put some attribute that would be recognized by compilers still used in current distributions to avoid the warning. Can you add this change?

berarma commented 3 years ago

I didn't know a simple comment would do the job.

Thanks!