More warning fixes and some cleanups - #83
Conversation
-Wunused-variable -Wunused-but-set-variable
-Wunused-function
No need to use argc & argv[] and its parsing, use explicit arguments instead. Thus, we do not call do_early_args and do_args anymore and we can remove do_early_args. The for loop about the `verbose` variable is left and some bool variables are left in case it used later. It could also be removed easily if needed.
pkgw
left a comment
There was a problem hiding this comment.
Great, thanks for doing more of this cleanup! A few small comments below.
| } | ||
|
|
||
| dpx_warning("Not a boolean object."); | ||
| dpx_warning("Not a bool object."); |
There was a problem hiding this comment.
Tiny nit, but I think this one should be kept as-is.
| /* state */ | ||
| double pen_size; | ||
| int fill_shape; /* boolean */ | ||
| int fill_shape; /* bool */ |
There was a problem hiding this comment.
Here too ... or turn it into an actual bool if convenient?
There was a problem hiding this comment.
Fixed. I added an additional commit to change two variables (including this one) from int to bool in this file.
|
|
||
| /* End config file fakery. */ | ||
|
|
||
| do_args (argc, argv, NULL, 0); |
There was a problem hiding this comment.
Can the do_args function now be removed? I'm not seeing it show up in the diff.
There was a problem hiding this comment.
Not a the moment unfortunately.read_config_special calls do_args. This function is used in dpx-dvi.c, it seems like it is possible to put additional command arguments in the dvi itself, which is then processed and it calls the do_args eventually again.
I am not sure if such feature is really used, so I took the safe choice to keep it. But we could investigate a bit more to know whether or not we could remove all of this.
The bool type already exists in stdbool.h, so let's use it.
stdbool.h already defines true and false so no need to use TRUE & FALSE macro in the first place. Such macro, however, were never used in the source code so let's remove them.
Introduced in 014a411 r < 0 is always false otherwise...
66389fe to
1a6ab65
Compare
|
Fixed. I also added 2 additional fixes. |
|
Looks good! |
Replace some crypto, usage of rand
No description provided.