fix gcc building

This commit is contained in:
Nick Chan committed 2023-01-27 22:06:43 +08:00
1 parent 3e6382f65e
commit 2cafb8ae19
4 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ SRC = $(shell pwd)
DEP = $(SRC)/dep_root
STRIP = strip
CC ?= cc
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC) -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\"
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC) -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
ifeq ($(TARGET_OS),)
TARGET_OS = $(shell uname -s)
+1 -1
View File
@@ -230,7 +230,7 @@ int enter_recovery_cmd(const char* udid) {
int reboot_cmd(const char* udid) {
idevice_t device = NULL;
lockdownd_client_t __unused lockdown = NULL;
lockdownd_client_t lockdown = NULL;
if (idevice_new(&device, udid) != IDEVICE_E_SUCCESS) {
LOG(LOG_ERROR, "Could not connect to device");
return -1;
+3 -3
View File
@@ -143,7 +143,7 @@ void* connected_dfu_mode(struct irecv_device_info* info) {
return NULL;
}
void device_event_cb(const usbmuxd_event_t *event, void* __unused userdata) {
void device_event_cb(const usbmuxd_event_t *event, void* userdata) {
if (event->device.conn_type != CONNECTION_TYPE_USB) return;
switch (event->event) {
case UE_DEVICE_ADD:
@@ -156,7 +156,7 @@ void device_event_cb(const usbmuxd_event_t *event, void* __unused userdata) {
}
}
void irecv_device_event_cb(const irecv_device_event_t *event, void* __unused userdata) {
void irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
pthread_t recovery_thread, dfu_thread;
switch(event->type) {
@@ -177,7 +177,7 @@ void irecv_device_event_cb(const irecv_device_event_t *event, void* __unused use
}
}
void *dfuhelper(void* __unused ptr) {
void *dfuhelper(void* ptr) {
subscribe_cmd(device_event_cb, irecv_device_event_cb);
while (spin) {
sleep(1);
+2 -2
View File
@@ -128,7 +128,7 @@ struct stuff
usb_device_handle_t handle;
};
static int FoundDevice(libusb_context __unused *ctx, libusb_device *dev, libusb_hotplug_event __unused event, void *arg)
static int FoundDevice(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *arg)
{
LOG(LOG_VERBOSE, "PongoOS USB Device connected\n");
stuff_t *stuff = arg;
@@ -176,7 +176,7 @@ static int FoundDevice(libusb_context __unused *ctx, libusb_device *dev, libusb_
return LIBUSB_SUCCESS;
}
static int LostDevice(libusb_context __unused *ctx, libusb_device *dev, libusb_hotplug_event __unused event, void *arg)
static int LostDevice(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *arg)
{
LOG(LOG_VERBOSE, "PongoOS USB Device disconnected");
stuff_t *stuff = arg;