Remove four self-assignments in backtrace.c that were added to avoid an unused parameter warning and add ATTRIBUTE((unused)) to the implicated parameters so they will not trigger the warning because they could not be removed.

git-svn-id: https://svn.eduke32.com/eduke32@2397 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-03-04 09:31:02 +00:00
parent 27b279a1ce
commit 1927df852d
2 changed files with 5 additions and 8 deletions

View file

@ -348,7 +348,7 @@ endif
# RULES
$(EBACKTRACEDLL): Windows/src/backtrace.c
if $(CC) -O2 -shared -Wall -Wextra -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) -O2 -shared -Wall -Wextra -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.nasm
$(COMPILE_STATUS)

View file

@ -35,6 +35,8 @@
#include <sys/stat.h>
#include <time.h>
#include "compat.h"
#define BUFFER_MAX (16*1024)
struct bfd_ctx {
@ -365,11 +367,8 @@ backtrace_unregister(void)
}
BOOL WINAPI
DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
DllMain(HANDLE hinstDLL ATTRIBUTE((unused)), DWORD dwReason, LPVOID lpvReserved ATTRIBUTE((unused)))
{
hinstDLL = hinstDLL;
lpvReserved = lpvReserved;
switch (dwReason) {
case DLL_PROCESS_ATTACH:
backtrace_register();
@ -383,10 +382,8 @@ DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
/* cut dependence on libintl... libbfd needs this */
char *libintl_dgettext (const char *domain_name, const char *msgid)
char *libintl_dgettext (const char *domain_name ATTRIBUTE((unused)), const char *msgid ATTRIBUTE((unused)))
{
static char buf[1024] = "XXX placeholder XXX";
domain_name = domain_name;
msgid = msgid;
return buf;
}