diff -urp libphidget22-1.4.20190605.orig/src/plat/linux/usblinux.c libphidget22-1.4.20190605/src/plat/linux/usblinux.c --- libphidget22-1.4.20190605.orig/src/plat/linux/usblinux.c 2019-06-05 16:06:29.000000000 -0400 +++ libphidget22-1.4.20190605/src/plat/linux/usblinux.c 2019-07-18 09:35:23.566476582 -0400 @@ -62,11 +62,12 @@ static libusb_context *libusbContext; static void logBuffer(unsigned char *data, int dataLen, const char *message) { Phidget_LogLevel ll; + PhidgetReturnCode ret; char str[2000]; int i, j; - PhidgetLog_getSourceLevel("phidget22usb", &ll); - if (ll != PHIDGET_LOG_VERBOSE) + ret = PhidgetLog_getSourceLevel("phidget22usb", &ll); + if (ret != EPHIDGET_OK || ll != PHIDGET_LOG_VERBOSE) return; str[0]='\0'; diff -Nurp libphidget22-1.4.20190605.orig/src/vintpackets.c libphidget22-1.4.20190605/src/vintpackets.c --- libphidget22-1.4.20190605.orig/src/vintpackets.c 2019-06-05 20:06:22.000000000 +0000 +++ libphidget22-1.4.20190605/src/vintpackets.c 2019-08-06 16:43:45.856531653 +0000 @@ -2783,7 +2783,7 @@ sendLCD1100_WRITEBITMAP(PhidgetChannelHa unsigned char bit; uint8_t buf[48]; const uint8_t *bitmap; - int count; + int count = 0; int xsize; int ysize; int x; diff -Nurp libphidget22-1.4.20190605.orig/src/class/distancesensor.gen.c libphidget22-1.4.20190605/src/class/distancesensor.gen.c --- libphidget22-1.4.20190605.orig/src/class/distancesensor.gen.c 2019-06-05 20:06:28.000000000 +0000 +++ libphidget22-1.4.20190605/src/class/distancesensor.gen.c 2019-08-06 16:51:37.053708754 +0000 @@ -228,8 +228,8 @@ _initAfterOpen(PhidgetChannelHandle phid MOS_PANIC("Unsupported Channel"); } - memset(ch->amplitudes, '\0', 8); - memset(ch->distances, '\0', 8); + memset(ch->amplitudes, '\0', sizeof(uint32_t) * 8); + memset(ch->distances, '\0', sizeof(uint32_t) * 8); ch->count = 0; return (ret); diff -Nurp libphidget22-1.4.20190605.orig/configure libphidget22-1.4.20190605/configure --- libphidget22-1.4.20190605.orig/configure 2019-06-05 16:06:56.000000000 -0400 +++ libphidget22-1.4.20190605/configure 2019-09-05 11:50:10.510502872 -0400 @@ -5676,7 +5676,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr}