-
Notifications
You must be signed in to change notification settings - Fork 51
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
vcgencmd: Avoid compiler complaints #65
base: master
Are you sure you want to change the base?
Conversation
@XECDesign does this fix your build issues? |
See #64. |
In file included from /usr/include/string.h:535, from /<<PKGBUILDDIR>>/vcgencmd/vcgencmd.c:34: In function ‘strncat’, inlined from ‘gencmd’ at /<<PKGBUILDDIR>>/vcgencmd/vcgencmd.c:109:4, inlined from ‘main’ at /<<PKGBUILDDIR>>/vcgencmd/vcgencmd.c:152:14: /usr/include/arm-linux-gnueabihf/bits/string_fortified.h:138:10: warning: ‘__builtin___strncat_chk’ specified bound 1024 equals destination size [-Wstringop-overflow=] 138 | return __builtin___strncat_chk (__dest, __src, __len, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ can be seen with "gcc -O2 -Wall"
9ee7a22
to
e02290d
Compare
Okay - dropped eeptools commit. |
Seems to build, yeah. |
I can update the package once this is merged. |
@pelwell is this okay? |
I don't understand (without seeing the errors) why memset (which will happily copy beyond the end of the string) is somehow more acceptable than strncpy, but I'm happy for this to be merged. |
Full disclosure: I didn't try building from head of tree without this commit. So if there's a chance it's not needed, I can try without it. Update: seems happy without it. |
I was curious why it wasn't failing and it looks like some cmake files have this line: vcgencmd doesn't, so it only inherits the CFLAGS passed down by Debian's build system - |
In the commit message was the error:
it seems strncat triggers some additional bounds checking that memcpy does not. |
Please can we not include |
Latest compilers are more fussy and this doesn't build with debian build scripts. Fix this.