[syslinux] [PATCH 2/5] ntfs: remove unused variable and have ntfssect use char API calls

Pete Batard
Thu, 25 Feb 2016 12:30:02 -0000

Hi Shao,

On 2016.02.24 23:43, Shao Miller via Syslinux wrote:
> Did you happen to notice anything unusual when compiling with MinGW
> under Linux, once 'ok' was removed?  I seem to recall warnings
about
> unused results, but not of unused objects.  Maybe that's an incorrect
> recollection or maybe it's ancient history, however.

I got no warnings with the patch on Debian 8 + MinGW-w64.
Here's the relevant compilation excerpt:

make[3]: Entering directory '/usr/src/syslinux/bios/win64'
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o syslinux.obj
/usr/src/syslinux/win64/../win/syslinux.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o ntfssect.obj
/usr/src/syslinux/win64/../win/ntfssect.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o fs.obj
/usr/src/syslinux/win64/../libinstaller/fs.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o syslxmod.obj
/usr/src/syslinux/win64/../libinstaller/syslxmod.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o syslxopt.obj
/usr/src/syslinux/win64/../libinstaller/syslxopt.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o setadv.obj
/usr/src/syslinux/win64/../libinstaller/setadv.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o getopt_long.obj
/usr/src/syslinux/win64/../libinstaller/getopt/getopt_long.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o bootsect_bin.obj
/usr/src/syslinux/bios/win64/../libinstaller/bootsect_bin.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o ldlinux_bin.obj
/usr/src/syslinux/bios/win64/../libinstaller/ldlinux_bin.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o
ldlinuxc32_bin.obj
/usr/src/syslinux/bios/win64/../libinstaller/ldlinuxc32_bin.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o mbr_bin.obj
/usr/src/syslinux/bios/win64/../libinstaller/mbr_bin.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o cache.obj
/usr/src/syslinux/win64/../libfat/cache.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o fatchain.obj
/usr/src/syslinux/win64/../libfat/fatchain.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o open.obj
/usr/src/syslinux/win64/../libfat/open.c
x86_64-w64-mingw32-gcc   -Wno-sign-compare -Os -fomit-frame-pointer
-D_FILE_OFFSET_BITS=64 -I/usr/src/syslinux/win64
-I/usr/src/syslinux/win64/.. -I/usr/src/syslinux/win64/../win
-I/usr/src/syslinux/bios -I/usr/src/syslinux/win64/../libfat
-I/usr/src/syslinux/win64/../libinstaller
-I/usr/src/syslinux/win64/../libinstaller/getopt -c -o searchdir.obj
/usr/src/syslinux/win64/../libfat/searchdir.c
rm -f syslinux.lib
x86_64-w64-mingw32-ar cq syslinux.lib fs.obj syslxmod.obj syslxopt.obj
setadv.obj getopt_long.obj bootsect_bin.obj ldlinux_bin.obj
ldlinuxc32_bin.obj mbr_bin.obj cache.obj fatchain.obj open.obj searchdir.obj
x86_64-w64-mingw32-ranlib syslinux.lib
x86_64-w64-mingw32-gcc -Os -s -o syslinux64.exe syslinux.obj
ntfssect.obj syslinux.lib
make[3]: Leaving directory '/usr/src/syslinux/bios/win64'

Regards,

/Pete