Skip to content

Enable more warnings #28

@ryandesign

Description

@ryandesign

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions