Commit 1657ce69 authored by erik's avatar erik

fix some compiler warnings

parent d9985954
...@@ -839,7 +839,7 @@ static void *FtThread(FT_HANDLE hFt) ...@@ -839,7 +839,7 @@ static void *FtThread(FT_HANDLE hFt)
//ret = usb_control_msg(hFt->device, 0xc0, 0xfb, 0x102, 0x1, in, 2, FT_USB_TIMEOUT); //ret = usb_control_msg(hFt->device, 0xc0, 0xfb, 0x102, 0x1, in, 2, FT_USB_TIMEOUT);
ret = usb_control_msg(hFt->device, 0xc0, 0xfb, hFt->transfer_area.RfModulNr << 8 | 0x02, 0x1, in, 2, FT_USB_TIMEOUT); ret = usb_control_msg(hFt->device, 0xc0, 0xfb, hFt->transfer_area.RfModulNr << 8 | 0x02, 0x1, in, 2, FT_USB_TIMEOUT);
if (ret != 2) { if (ret != 2) {
fprintf(stderr, "%d FtThread: Error initiating RF Module!\n"); fprintf(stderr, "FtThread: Error initiating RF Module!\n");
area->TransferAktiv = 0; area->TransferAktiv = 0;
} }
break; break;
...@@ -1262,7 +1262,7 @@ long int DownloadFtProgram(FT_HANDLE hFt, long int dwMemBlock, unsigned char *pb ...@@ -1262,7 +1262,7 @@ long int DownloadFtProgram(FT_HANDLE hFt, long int dwMemBlock, unsigned char *pb
printf("\n");*/ printf("\n");*/
ret = usb_control_msg(hFt->device, 0x40, 0x11, i+1, crc, buffer, PROGRAM_UPLOAD_PACKET_SIZE, FT_USB_TIMEOUT_LONG); ret = usb_control_msg(hFt->device, 0x40, 0x11, i+1, crc, buffer, PROGRAM_UPLOAD_PACKET_SIZE, FT_USB_TIMEOUT_LONG);
if (ret < 0) { if (ret < 0) {
fprintf(stderr, "Error sending control msg 0x40 0x11 0x%x\n", i+1); fprintf(stderr, "Error sending control msg 0x40 0x11 0x%lx\n", i+1);
return ret; return ret;
} }
......
...@@ -106,7 +106,7 @@ int read_hex(char *filename, char **result, int *dest) ...@@ -106,7 +106,7 @@ int read_hex(char *filename, char **result, int *dest)
fgets(buffer, 4+1, f); // address fgets(buffer, 4+1, f); // address
if (feof(f)) break; if (feof(f)) break;
strncpy(tmp, buffer, 4+1); strncpy(tmp, buffer, 4+1);
sscanf(tmp, "%x", &addr); sscanf(tmp, "%x", (unsigned int *)&addr);
diff = (addr - addr_pre) - len_pre; diff = (addr - addr_pre) - len_pre;
if (diff > 0) { if (diff > 0) {
...@@ -488,8 +488,8 @@ int main(int argc, char *argv[]) { ...@@ -488,8 +488,8 @@ int main(int argc, char *argv[]) {
printf("Serial:\t\t%s\n", s); printf("Serial:\t\t%s\n", s);
free(s); free(s);
GetRFMode(RBInt, &frequency, &callsign); GetRFMode(RBInt, &frequency, &callsign);
printf("RF frequency:\t\t%d\n", frequency); printf("RF frequency:\t\t%ld\n", frequency);
printf("RF call sign:\t\t%d\n", callsign); printf("RF call sign:\t\t%ld\n", callsign);
break; break;
case 'f': case 'f':
upload_firmware(RBInt, optarg); upload_firmware(RBInt, optarg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment