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

clang warnings #160

Open
polluks opened this issue Dec 30, 2022 · 0 comments
Open

clang warnings #160

polluks opened this issue Dec 30, 2022 · 0 comments

Comments

@polluks
Copy link
Contributor

polluks commented Dec 30, 2022

rim10-file.c:296:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (i = 0; i < sizeof midas_rim10 / sizeof midas_rim10[0]; i++)
              ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tvpic.c:51:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (y = 0; y < height; y++)
              ~ ^ ~~~~~~
constantinople.c:111:7: warning: variable 'start' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
  if (optind < argc)
      ^~~~~~~~~~~~~
constantinople.c:130:28: note: uninitialized use occurs here
  analyse_consta (&memory, start, end);
                           ^~~~~
constantinople.c:111:3: note: remove the 'if' if its condition is always true
  if (optind < argc)
  ^~~~~~~~~~~~~~~~~~
constantinople.c:93:12: note: initialize the variable 'start' to silence this warning
  int start, end;
           ^
            = 0
constantinople.c:116:7: warning: variable 'end' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
  if (optind < argc)
      ^~~~~~~~~~~~~
constantinople.c:130:35: note: uninitialized use occurs here
  analyse_consta (&memory, start, end);
                                  ^~~
constantinople.c:116:3: note: remove the 'if' if its condition is always true
  if (optind < argc)
  ^~~~~~~~~~~~~~~~~~
constantinople.c:93:17: note: initialize the variable 'end' to silence this warning
  int start, end;
                ^
                 = 0
dumper.c:141:37: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
    fprintf (f, "%s.%02ld", string, tv[0].tv_usec / 10000);
                    ~~~~~           ^~~~~~~~~~~~~~~~~~~~~
                    %02d
dumper.c:713:1: warning: unused function 'write_usr' [-Wunused-function]
write_usr (FILE *f)
^
acct.c:61:1: warning: unused function 'print_octal' [-Wunused-function]
print_octal (word_t word)
^
classify-tape.c:47:1: warning: unused function 'read_32bits_l' [-Wunused-function]
read_32bits_l (uint8_t *start)
^
@polluks polluks changed the title clang warning clang warnings Dec 30, 2022
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

1 participant