View previous topic :: View next topic |
Author |
Message |
Cuong Nguyen Apprentice
Joined: 18 Jan 2018 Posts: 152
|
Posted: Mon Mar 19, 2018 7:28 am Post subject: sys-boot/udk-2015 error: ISO C++ forbids comparison between |
|
|
Hello, have anyone tried emerge sys-boot/refind with TianoCore library instead of default gnuefi?
I've tried building refind with gnu-efi library but my system can't boot to refind boot manager. I manually unzipped refind binary from the author's site https://www.rodsbooks.com/refind/index.html and it works. This binary built with TianoCore library.
So I masked gnu-efi and start building sys-boot/udk-2015 and got the following error:
Code: |
VfrUtilityLib.cpp:3287:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (mStringFileName == '\0' ) {
^~~~
VfrUtilityLib.cpp:3310:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread ((char *)StringPtr, sizeof (UINT8), Length, pInFile);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [<builtin>: VfrUtilityLib.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-boot/udk-2015/work/MyWorkSpace/BaseTools/Source/C/VfrCompile'
make[1]: *** [GNUmakefile:79: VfrCompile] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-boot/udk-2015/work/MyWorkSpace/BaseTools/Source/C'
make: *** [GNUmakefile:25: Source/C] Error 2
make: Leaving directory '/var/tmp/portage/sys-boot/udk-2015/work/MyWorkSpace/BaseTools'
|
How to patch this error? I use gcc-7.3.0
Thanks |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Mon Mar 19, 2018 8:28 am Post subject: |
|
|
Maybe:
Code: | if (strlen(mStringFileName) == 0) { |
[Moderator edit: added [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21629
|
Posted: Tue Mar 20, 2018 1:47 am Post subject: |
|
|
Irre wrote: | Maybe:
Code: | if (strlen(mStringFileName) == 0) { |
[Moderator edit: added [code] tags to preserve output layout. -Hu] | No. This is an annoyingly common mistake with people who know about strlen, but do not think about how it works. String lengths are not cached. Computing them requires walking the string. If all you want to know is whether the string is empty, test that. Do not count the length of the string just to test if you counted to zero. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Tue Mar 20, 2018 6:20 am Post subject: |
|
|
Could you do that for us? See bug 628300 |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Tue Mar 20, 2018 8:13 am Post subject: |
|
|
charles17 wrote: |
Could you do that for us? See bug 628300 |
Unfortunately no, because I do not know the program and with a quick look in 2015 ebuild isn't a trivial package _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|