-
Notifications
You must be signed in to change notification settings - Fork 262
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
Compile warnings for libsrc/v1hpg.c and nc_test/tst_utf8_validate.c... #697
Comments
Looking very nice now. I am also seeing a couple others:
And
|
Clang finds a few others including:
In addition there are some "static analysis" type warnings about potentially uninitialized variables. I really appreciate the work on making the builds clean... very nice. |
I think this warning points to an incorrect test:
The code above this is:
So I think is should be testing |
Howdy @gdsjaar! Allow me to address your points... For the ncgen.y warnings, I'm not sure what to do if anything. The .y file is part of ncgen which generates some C code. I'm wary of messing with it, so I think I will leave it alone (at least for now). If someone can suggest how to clear these warnings, I am all ears. For the putget warning, I actually get a slightly different warning from you:
Note that my warning points to the m4 file, yours to the C file. (Possibly you did not start from a distclean?) The problem is in putget.m4, here:
This is m4 to generate the C code. As you can see, when $1 is 'char' the fillp is not used. (Because you can't set fill value for char? I don't remember...). So this generates the warning. The presence of ERANGE_FILL complicates things. It is turned off by default, and I have not yet tested with it on. ;-) I think I will leave this m4 code task to someone else until I really run out of things to do first thing in the morning to warm up my programming muscles. ;-) |
When I use --enable-dap I get some more warnings, some of which are easy, and I fixed. Others I have left alone. This includes some of the warnings you are seeing in clang. Take a look after my next PR is merged and see what is left. If you want to help figure them out, that would be great. Whatever is left are the warnings I couldn't easily fix. ;-) |
That sounds good. |
The ngenl.[ch] files are produced by the Lex lexer generator tool. Similarly, |
|
I am preparing a fix pr for the following files: |
From that issue, fix the identified errors in the following files: libdap4/d4file.c libdap4/d4read.c ncgen/genc.c ncgen/ncgen.l ncgen/ncgen.y
With the recent merges, we have cleared almost all compile warnings in the code for gcc -Wall.
However, here's two that have been introduced:
Easily fixed. I will put fix in my next PR.
Another warning, which has been there for a long time, is this one:
In this case we were using '^@' for a null char in a string literal, instead of the equivalent (and gcc-preferred) '/000'. I made the change to eliminate the warning.
The text was updated successfully, but these errors were encountered: