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 compilation warnings #1966

Closed
wants to merge 3 commits into from
Closed

Conversation

homm
Copy link
Member

@homm homm commented Jun 19, 2016

No description provided.

@homm
Copy link
Member Author

homm commented Jun 19, 2016

@wiredfool Tests fails with segmentation fault on TestJ2kEncodeOverflow.test_j2k_overflow. Do we need to replace SIZE_MAX with INT_MAX there?

@homm
Copy link
Member Author

homm commented Jun 19, 2016

By the way:

size_t size1 = SIZE_MAX;
unsigned size2 = SIZE_MAX;

printf("%p\n", size1);
printf("%p\n", size2);
0xffffffff
0xffffffffffffffff

@wiredfool
Copy link
Member

The SIZE_MAX is fixed in the malloc check branch, so I'd leave it to that.

@homm
Copy link
Member Author

homm commented Jun 19, 2016

removed Jpeg2KEncode fix from this pr

@wiredfool
Copy link
Member

cherry-picked b4e0ba1

@wiredfool wiredfool closed this Jun 21, 2016
@homm homm deleted the fix-warnings branch June 21, 2016 11:27
@homm
Copy link
Member Author

homm commented Jun 29, 2016

The SIZE_MAX is fixed in the malloc check branch, so I'd leave it to that.

I'm still seeing warnings.

$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ccache gcc -mavx2 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_OPENJPEG -DHAVE_LIBZ -DHAVE_LIBIMAGEQUANT -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/usr/include/openjpeg-2.1 -I/home/homm/Code/Pillow/libImaging -I/home/homm/env/env_ucare/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Jpeg2KEncode.c -o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KEncode.o
libImaging/Jpeg2KEncode.c: In function ‘j2k_encode_entry’:
libImaging/Jpeg2KEncode.c:271:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     unsigned _SIZE__MAX = SIZE_MAX;
     ^

@wiredfool
Copy link
Member

SIZE_MAX isn't in Jpeg2kEncode.c in master at all.

@homm
Copy link
Member Author

homm commented Jul 1, 2016

Woops. Looks like some problem with ccache or I just was not careful enough.

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

Successfully merging this pull request may close these issues.

None yet

2 participants