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

Build fail with gcc14 #171

Open
ggardet opened this issue Oct 22, 2024 · 1 comment
Open

Build fail with gcc14 #171

ggardet opened this issue Oct 22, 2024 · 1 comment

Comments

@ggardet
Copy link

ggardet commented Oct 22, 2024

Build fail on openSUSE Tumbleweed with initialization of ‘off_t’ {aka ‘long int’} from ‘id’ makes integer from pointer without a cast [-Wint-conversion] likely because of gcc 14 enabling more flags by default.

Error log:

[   19s] gcc -std=gnu99 -O2 -Wno-import -Wno-multichar -g -D_FILE_OFFSET_BITS=64 -isystem /usr/include/GNUstep -DGNUSTEP -DGNU_RUNTIME=1 -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fexceptions -fobjc-exceptions -fconstant-string-class=NSConstantString -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -fno-strict-aliasing -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fconstant-string-class=NSConstantString -I. -I/home/abuild/GNUstep/Library/Headers -I/usr/local/include -I/usr/include -MMD -MFBuild/XADRAR5Parser.d -MTBuild/XADRAR5Parser.o -c XADRAR5Parser.m -o Build/XADRAR5Parser.o
[   19s] XADRAR5Parser.m: In function ‘+[XADRAR5Parser recognizeFileWithHandle:firstBytes:name:]’:
[   19s] XADRAR5Parser.m:79:5: warning: ‘XADRAR5Parser’ may not respond to ‘+signatureLocationInData:’
[   19s]    79 |     off_t signatureLocation = [self signatureLocationInData:data];
[   19s]       |     ^~~~~
[   19s] XADRAR5Parser.m:79:5: warning: (messages without a matching method signature will be assumed to return ‘id’ and accept ‘...’ as arguments)
[   19s] XADRAR5Parser.m:79:31: error: initialization of ‘off_t’ {aka ‘long int’} from ‘id’ makes integer from pointer without a cast [-Wint-conversion]
[   19s]    79 |     off_t signatureLocation = [self signatureLocationInData:data];
[   19s]       |                               ^
[   19s] XADRAR5Parser.m: In function ‘-[XADRAR5Parser addEntryWithDictionary:inputParts:isCorrupted:]’:
[   19s] XADRAR5Parser.m:334:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
[   19s]   334 |         while(part=[enumerator nextObject]) compsize+=[[part objectForKey:@"InputLength"] longLongValue];
[   19s]       |               ^~~~
[   19s] make: *** [Makefile.linux:98: Build/XADRAR5Parser.o] Error 1
[   19s] make: Leaving directory '/home/abuild/rpmbuild/BUILD/unar-1.10.8/unar'
[   19s] make: *** Waiting for unfinished jobs....
@ggardet
Copy link
Author

ggardet commented Oct 22, 2024

A workaround is to add -Wno-int-conversion

@ggardet ggardet changed the title Build fail with gnustep 1.30.0 Build fail with gcc14 Oct 22, 2024
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

1 participant