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

Fix compiler warnings. #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

moritzbuhl
Copy link

cc -O2 -pipe  -DVERSION='"2.8.11"'    -c -o detex.o detex.c
detex.l:140:7: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
char *getenv();
      ^
/usr/include/stdlib.h:110:7: note: conflicting prototype is here
char    *getenv(const char *);
         ^
detex.l:413:36: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
                                                        rgsbIncList[csbIncList++] = '\0';
                                                                                    ^~~~
detex.l:360:54: warning: result of comparison of constant -1 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
                while ((c = input()) != verbchar && c != '\n' && c != EOF && c != 0) {
                                                                 ~ ^  ~~~
detex.l:825:8: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
        FILE    *TexOpen();
                 ^
detex.l:137:7: note: conflicting prototype is here
FILE *TexOpen(char *sbFile);
      ^
detex.l:851:8: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
        FILE    *TexOpen();
                 ^
detex.l:137:7: note: conflicting prototype is here
FILE *TexOpen(char *sbFile);
      ^
5 warnings generated.

cc -O2 -pipe  -DVERSION='"2.8.11"'    -c -o detex.o detex.c
detex.l:140:7: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
char *getenv();
      ^
/usr/include/stdlib.h:110:7: note: conflicting prototype is here
char    *getenv(const char *);
         ^
detex.l:413:36: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
                                                        rgsbIncList[csbIncList++] = '\0';
                                                                                    ^~~~
detex.l:360:54: warning: result of comparison of constant -1 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
                while ((c = input()) != verbchar && c != '\n' && c != EOF && c != 0) {
                                                                 ~ ^  ~~~
detex.l:825:8: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
        FILE    *TexOpen();
                 ^
detex.l:137:7: note: conflicting prototype is here
FILE *TexOpen(char *sbFile);
      ^
detex.l:851:8: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
        FILE    *TexOpen();
                 ^
detex.l:137:7: note: conflicting prototype is here
FILE *TexOpen(char *sbFile);
      ^
5 warnings generated.
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

Successfully merging this pull request may close these issues.

1 participant