c2t icon indicating copy to clipboard operation
c2t copied to clipboard

Enable more warnings

Open ryandesign opened this issue 2 years ago • 1 comments

Consider enabling -Wextra and -Wpedantic to see a bunch of warnings about your code such as:

c2t.c:244:12: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                for(j=0;j<strlen(argv[i]);j++) {
                        ~^~~~~~~~~~~~~~~~

and:

c2t.c:1436:11: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void usage()
          ^
           void

and:

./fake6502.h:995:22: warning: assigning to 'void (*)()' from 'void *' converts between void pointer and function pointer [-Wpedantic]
        loopexternal = funcptr;
                     ^ ~~~~~~~

You currently repeat the warning flags in several places in the Makefile. Consider using a variable to store them so you only have to update them in one place in the future.

ryandesign avatar Oct 10 '23 07:10 ryandesign

thanks, will add to backlog

datajerk avatar Oct 10 '23 21:10 datajerk