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

integer constant is too large for 'long' type #61

Closed
gcode-importer opened this issue Jan 30, 2011 · 4 comments
Closed

integer constant is too large for 'long' type #61

gcode-importer opened this issue Jan 30, 2011 · 4 comments
Assignees
Labels

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 61

ubuntu 64 bits, libjp3dvm/:

dwt.c:222: warning: integer constant is too large for 'long' type

jp3d.c:1526: warning: integer constant is too large for 'long' type

Reported by detonin on 2011-01-30 15:30:57

@gcode-importer
Copy link
Author

At least for the dwt.c the issue is that a pointer is cast into an integer type. Originally
the pointer was being cast into an int which would cause a warning and potentially
bugs on architectures in which a pointer and an int are not the same size. The currently
committed fix is to cast the pointer into a long instead of and int. While this fixes
the problem on the architecture I'm interested in (MacOSX/Darwin) where long is 4bytes
when building in 32bit and 8bytes when building in 64bit, a better approach might be
to use an integer type that is promised to track the pointer size such as size_t or
intptr_t.

Cheers,
Joël

Reported by spalte on 2011-02-17 13:48:29

@gcode-importer
Copy link
Author

Thanks Joël. I replaced the 'long' of r724 in dwt.c with 'size_t'.

However, it seems this issue (61) is related to another kind of problem specific to
libjp3dvm.

Cheers,

Antonin

Reported by detonin on 2011-02-17 21:11:51

@gcode-importer
Copy link
Author

Reported by vincent.torri on 2011-07-26 19:38:40

  • Labels added: Milestone-openjpeg3d

@gcode-importer
Copy link
Author

Reported by malaterre on 2012-05-29 17:07:26

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

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

No branches or pull requests

3 participants