-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Commit 681296e did this only for clang, but GCC has the same warning which we want to supress (until the code is fixed).
Errors from various called functions were stored in the `ret` variable, but this variable was never checked.
This macro depends on the macro `max()` which is not provided by this library.
After commit 52cb87e, jpc_dec_dump() kept on using `PRIiFAST32`, but in 32 bit mode, this should be `PRIiLEAST32`. The new macro `PRIjas_seqent` can be used instead.
Fixes `-Wunused-but-set-variable`.
This doesn't avoid anything.
`hc` can only be `0` or `1` here. This fixes `-Wmaybe-uninitialized`.
`-Wimplicit-fallthrough`.
Similar to commit f3d4075 but for GCC this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this cleanup:
- Type safety
- constness
- Replacing old C-macros with inline functions
- Using unsigned types for countable values
@@ -972,6 +976,8 @@ static void render() | |||
if (cmdopts.verbose) { | |||
// fprintf(stderr, "vtlx=%f, vtly=%f, vsx=%f, vsy=%f\n", | |||
// vtlx, vtly, gs.sx, gs.sy); | |||
/* suppress -Wunused-but-set-variable */ | |||
(void)vtlx; (void)vtly; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend to split statements Declare one name (only) per declaration
(void)vtlx; (void)vtly; | |
(void)vtlx; | |
(void)vtly; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on this one. It makes it more readable to me. But I don't care much and can merge anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't supposed to be "readable". This is a kludge to work around a compiler warning for code which is commented out for unknown reasons. Usually, I wouldn't write two statements on one line, but in this case I decided to do so because I didn't want to waste any screen space for this cr*p.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether this is a good reason to break with the style ;)
All gcc/clang warnings are now fixed.