projects
/
kinect-audio-setup.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kinect_upload_fw: fix -Wmissing-prototypes warning
[kinect-audio-setup.git]
/
kinect_upload_fw
/
kinect_upload_fw.c
diff --git
a/kinect_upload_fw/kinect_upload_fw.c
b/kinect_upload_fw/kinect_upload_fw.c
index
1466ccd
..
c932908
100644
(file)
--- a/
kinect_upload_fw/kinect_upload_fw.c
+++ b/
kinect_upload_fw/kinect_upload_fw.c
@@
-57,14
+57,14
@@
typedef struct {
#define fn_le32(x) (x)
// TODO: support architectures that aren't little-endian
#define fn_le32(x) (x)
// TODO: support architectures that aren't little-endian
-void dump_bl_cmd(bootloader_command cmd) {
+
static
void dump_bl_cmd(bootloader_command cmd) {
int i;
for(i = 0; i < 24; i++)
LOG("%02X ", ((unsigned char*)(&cmd))[i]);
LOG("\n");
}
int i;
for(i = 0; i < 24; i++)
LOG("%02X ", ((unsigned char*)(&cmd))[i]);
LOG("\n");
}
-
int get_first_reply(
) {
+
static int get_first_reply(void
) {
unsigned char buffer[512];
int res;
int transferred;
unsigned char buffer[512];
int res;
int transferred;
@@
-82,8
+82,7
@@
int get_first_reply() {
return res;
}
return res;
}
-
-int get_reply() {
+static int get_reply(void) {
unsigned char dump[512];
status_code buffer = ((status_code*)dump)[0];
int res;
unsigned char dump[512];
status_code buffer = ((status_code*)dump)[0];
int res;
@@
-104,14
+103,14
@@
int get_reply() {
if(fn_le32(buffer.status) != 0) {
LOG("Notice reading reply: last uint32_t was nonzero: %d\n", buffer.status);
}
if(fn_le32(buffer.status) != 0) {
LOG("Notice reading reply: last uint32_t was nonzero: %d\n", buffer.status);
}
-
+
LOG("Reading reply: ");
int i;
for(i = 0; i < transferred; ++i) {
LOG("%02X ", ((unsigned char*)(&buffer))[i]);
}
LOG("\n");
LOG("Reading reply: ");
int i;
for(i = 0; i < transferred; ++i) {
LOG("%02X ", ((unsigned char*)(&buffer))[i]);
}
LOG("\n");
-
+
return res;
}
return res;
}
@@
-212,10
+211,9
@@
int main(int argc, char** argv) {
res = get_reply();
seq++;
// Now the device reenumerates.
res = get_reply();
seq++;
// Now the device reenumerates.
-
+
cleanup:
libusb_close(dev);
libusb_exit(NULL);
return 0;
}
cleanup:
libusb_close(dev);
libusb_exit(NULL);
return 0;
}
-