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

missing break after case statement in opj_dwt_decode_real #274

Closed
gcode-importer opened this issue Mar 5, 2014 · 7 comments
Closed

missing break after case statement in opj_dwt_decode_real #274

gcode-importer opened this issue Mar 5, 2014 · 7 comments
Assignees
Milestone

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 274

            switch(j) {
            case 3: aj[k+w*2] = h.wavelet[k].f[2];
            case 2: aj[k+w  ] = h.wavelet[k].f[1];
            case 1: aj[k    ] = h.wavelet[k].f[0];
            }

Reported by boxerab on 2014-03-05 03:25:56

@gcode-importer
Copy link
Author

I do not see why ?

Reported by malaterre on 2014-03-07 10:09:13

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

It forces the code to check all three case statements without a break.
Also, looks like perhaps it was forgotten. 
Best practice is to add a break.

Reported by boxerab on 2014-03-07 13:14:27

@gcode-importer
Copy link
Author

Please either:
- provide a test case to understand what is wrong with this *valid* code
- or point to the section in part1 you think is incorrect.

From here, it looks as if you are reporting some kind of warning from your compiler.

Marking as wontfix for now.

Reported by malaterre on 2014-03-07 14:29:23

  • Status changed: WontFix
  • Labels added: Milestone-Release2.1

@gcode-importer
Copy link
Author

Hi Mathieu,
IMHO, the less warnings the better. After more than, say 20 compiler warnings,
one tends to not look too carefully at them, and one might miss an actual bug.
Aaron

Reported by boxerab on 2014-03-07 15:52:11

@gcode-importer
Copy link
Author

All 20 OS (Win/Lin/Mac) & Compilers (clang, gcc, VS) configurations are here: http://my.cdash.org/index.php?project=OPENJPEG

Where do you see this warning ?

Reported by malaterre on 2014-03-07 16:02:18

@gcode-importer
Copy link
Author

I am using Eclipse CDT Codan:

https://wiki.eclipse.org/CDT/designs/StaticAnalysis


Reported by boxerab on 2014-03-07 16:36:44

@gcode-importer
Copy link
Author

Codan gives me about 22 warnings

Reported by boxerab on 2014-03-07 16:42:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants