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

Fix for compiler warnings on pointer casts #69

Closed
pbleser opened this issue Oct 11, 2011 · 1 comment
Closed

Fix for compiler warnings on pointer casts #69

pbleser opened this issue Oct 11, 2011 · 1 comment

Comments

@pbleser
Copy link

pbleser commented Oct 11, 2011

Casting pointers as ints causes truncation and compiler warnings.
As those the pointers are just used in feh as means to pass any data, we just need to get rid of the compiler warnings.

The following patch uses a casting on intptr_t before casting to int to do so:
https://api.opensuse.org/public/source/X11:Utilities/feh/feh-fix_pointer_arithmetics.patch?rev=45ef01c1172dd974f39fed346d43073d

Furthermore, it uses %zu to print the intptr_t values, rather than %d (which isn't supported by ISO C90 but does the right thing on i586 and x86_64).

@derf
Copy link
Owner

derf commented Dec 23, 2011

Unable to reproduce with both gcc 4.6.2 and clang 3.0

Closing since I got no response to my question in #70.

@derf derf closed this as completed Dec 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants