misc: Fix some unitialized variable warnings that show up with -Os
parent
5fa84dc2b7
commit
cd03e9a22f
6
Makefile
6
Makefile
|
@ -1,7 +1,7 @@
|
|||
BACKEND_NAME = gutenprint52+usb
|
||||
EXEC_NAME = dyesub_backend
|
||||
|
||||
CFLAGS = -Wall -Wextra -g
|
||||
CFLAGS = -Wall -Wextra -g -Os
|
||||
LDFLAGS = `pkg-config --libs libusb-1.0`
|
||||
CPPFLAGS = `pkg-config --cflags libusb-1.0`
|
||||
|
||||
|
@ -25,9 +25,9 @@ $(BACKENDS): $(EXEC_NAME)
|
|||
ln -sf $(EXEC_NAME) $@
|
||||
|
||||
cppcheck:
|
||||
cppcheck -q -v --std=c99 --enable=all -I/usr/include -DURI_PREFIX=\"$(BACKEND_NAME)\" $(SOURCES)
|
||||
cppcheck -q -v --std=c99 --enable=all -I/usr/include $(CPPFLAGS) -DURI_PREFIX=\"$(BACKEND_NAME)\" $(SOURCES)
|
||||
|
||||
install:
|
||||
install:
|
||||
install -o root -m 700 $(EXEC_NAME) $(CUPS_BACKEND_DIR)/$(BACKEND_NAME)
|
||||
mkdir -p $(CUPS_DATA_DIR)/usb
|
||||
install -o root -m 644 blacklist $(CUPS_DATA_DIR)/usb/net.sf.gimp-print.usb-quirks
|
||||
|
|
|
@ -565,8 +565,7 @@ static void canonselphy_attach(void *vctx, struct libusb_device_handle *dev,
|
|||
/* Special cases for some models */
|
||||
if (ctx->printer->type == P_ES40_CP790) {
|
||||
int i;
|
||||
int printer_type;
|
||||
|
||||
int printer_type = -1;
|
||||
|
||||
if (desc.idProduct == USB_PID_CANON_CP790)
|
||||
printer_type = P_CP790;
|
||||
|
|
|
@ -463,7 +463,7 @@ static int print_scan_output(struct libusb_device *device,
|
|||
/* Try to claim the printer, and handle transient failures */
|
||||
if (!backend_claim_interface(dev, iface)) {
|
||||
int i;
|
||||
uint8_t endp_up, endp_down;
|
||||
uint8_t endp_up = 0, endp_down = 0;
|
||||
libusb_get_active_config_descriptor(device, &config);
|
||||
for (i = 0 ; i < config->interface[0].altsetting[0].bNumEndpoints ; i++) {
|
||||
if ((config->interface[0].altsetting[0].endpoint[i].bmAttributes & 3) == LIBUSB_TRANSFER_TYPE_BULK) {
|
||||
|
|
|
@ -1474,7 +1474,7 @@ top:
|
|||
|
||||
/* Set matte intensity */
|
||||
if (ctx->hdr.mattedepth != 0x7fffffff) {
|
||||
int current;
|
||||
int current = -1;
|
||||
i = shinkos1245_get_matte(ctx, ¤t);
|
||||
if (i < 0)
|
||||
goto printer_error;
|
||||
|
@ -1483,7 +1483,7 @@ top:
|
|||
if (i < 0)
|
||||
goto printer_error;
|
||||
if (i > 0) {
|
||||
/* We can't set the matte depth if we're printing */
|
||||
INFO("Can't set matte intensity when printing in progres...\n");
|
||||
state = S_IDLE;
|
||||
sleep(1);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue