beastpatcher: fix some minor issues

This mainly fixes some compiler warnings and makes it
work with mingw64.

Change-Id: Iabd13b5bed3427869ae78ceeb7e2255e68a6f7bd
This commit is contained in:
James Buren 2021-06-10 04:14:43 +00:00
parent ab0f23c4b1
commit fe9bcd0468
2 changed files with 4 additions and 2 deletions

View file

@ -10,12 +10,12 @@ OUTPUT=beastpatcher.exe
CROSS= CROSS=
else else
OUTPUT=beastpatcher OUTPUT=beastpatcher
CROSS=i586-mingw32msvc- CROSS=i686-w64-mingw32-
endif endif
endif endif
ifneq ($(findstring MINGW,$(shell uname)),MINGW) ifneq ($(findstring MINGW,$(shell uname)),MINGW)
LIBS := -lmtp -lusb LIBS := -lmtp
ifdef STATIC ifdef STATIC
LIBS := -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic LIBS := -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic
endif endif

View file

@ -123,6 +123,8 @@ int mtp_send_firmware(struct mtp_info_t* mtp_info, unsigned char* fwbuf,
size_t n; size_t n;
FILE* fwfile; FILE* fwfile;
(void) ret; /* suppress a set but not used warning */
/* Open a temporary file - this will be automatically deleted when closed */ /* Open a temporary file - this will be automatically deleted when closed */
fwfile = tmpfile(); fwfile = tmpfile();