DinoTools / libemu

4 stars 3 forks source link

Unused typedefs are causing unnecessary warnings/errors during build #8

Open xambroz opened 6 years ago

xambroz commented 6 years ago

Hello, the unused typedefs are causing warnings (and with default Debian / Fedora packaging optimalization options even errors) during the build of the package.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D _GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pipe -D _GNU_SOURCE -I../include -Werror -Wall -g -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -Wstrict-prototypes -c environment/linux/env_linux_syscall_hooks.c -o environment/linux/env_linux_syscall_hooks.o >/dev/null 2>&1
environment/win32/emu_env_w32.c: In function 'emu_env_w32_new':
environment/win32/emu_env_w32.c:385:21: error: typedef 'PUNICODE_STRING' locally defined but not used [-Werror=unused-local-typedefs]
  } UNICODE_STRING, *PUNICODE_STRING;
                     ^~~~~~~~~~~~~~~
environment/win32/emu_env_w32.c:395:17: error: typedef 'PLIST_ENTRY' locally defined but not used [-Werror=unused-local-typedefs]
  } LIST_ENTRY, *PLIST_ENTRY; //, *RESTRICTED_POINTER PRLIST_ENTRY;
                 ^~~~~~~~~~~
environment/win32/emu_env_w32.c:398:24: error: typedef 'BYTE' locally defined but not used [-Werror=unused-local-typedefs]
  typedef unsigned char BYTE;
                        ^~~~
environment/win32/emu_env_w32.c:418:4: error: typedef 'LDR_DATA_TABLE_ENTRY' locally defined but not used [-Werror=unused-local-typedefs]
  } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
    ^~~~~~~~~~~~~~~~~~~~
environment/win32/emu_env_w32.c:418:27: error: typedef 'PLDR_DATA_TABLE_ENTRY' locally defined but not used [-Werror=unused-local-typedefs]
  } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
                           ^~~~~~~~~~~~~~~~~~~~~
environment/win32/emu_env_w32.c:431:4: error: typedef 'PEB_LDR_DATA' locally defined but not used [-Werror=unused-local-typedefs]
  } PEB_LDR_DATA, *PPEB_LDR_DATA;
    ^~~~~~~~~~~~
environment/win32/emu_env_w32.c:431:19: error: typedef 'PPEB_LDR_DATA' locally defined but not used [-Werror=unused-local-typedefs]
  } PEB_LDR_DATA, *PPEB_LDR_DATA;
                   ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:792: environment/win32/emu_env_w32.lo] Error 1
make[3]: Leaving directory '/home/mambroz/rpmbuild/BUILD/libemu-ab48695b7113db692982a1839e3d6eb9e73e90a9/src'
make[2]: *** [Makefile:811: all-recursive] Error 1
make[2]: Leaving directory '/home/mambroz/rpmbuild/BUILD/libemu-ab48695b7113db692982a1839e3d6eb9e73e90a9/src'
make[1]: *** [Makefile:464: all-recursive] Error 1
make[1]: Leaving directory '/home/mambroz/rpmbuild/BUILD/libemu-ab48695b7113db692982a1839e3d6eb9e73e90a9'
make: *** [Makefile:373: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.nFYyK4 (%build)
xambroz commented 6 years ago

Please consider merging in the pull request https://github.com/DinoTools/libemu/pull/9

This patch is from Debian libemu package - libemu-05_unused_local_typedefs.patch https://packages.debian.org/search?searchon=sourcenames&keywords=libemu

xambroz commented 6 years ago

Related issue https://github.com/gento/libemu/issues/2