Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more warnings #28

Open
ryandesign opened this issue Oct 10, 2023 · 1 comment
Open

Enable more warnings #28

ryandesign opened this issue Oct 10, 2023 · 1 comment

Comments

@ryandesign
Copy link
Contributor

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.

@datajerk
Copy link
Owner

thanks, will add to backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants