kinect_upload_fw: fix a mingw32 compilation error
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 14 Oct 2011 19:57:12 +0000 (21:57 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Fri, 21 Oct 2011 20:16:03 +0000 (22:16 +0200)
When compiling with i586-mingw32msvci-g++ We get these errors:

kinect_upload_fw.c: In function ‘int main(int, char**)’:
kinect_upload_fw.c:236: error: jump to label ‘cleanup’
kinect_upload_fw.c:179: error:   from here
kinect_upload_fw.c:185: error:   crosses initialization of ‘uint32_t addr’
kinect_upload_fw.c:238: error: jump to label ‘fail_libusb_open’
kinect_upload_fw.c:155: error:   from here
kinect_upload_fw.c:185: error:   crosses initialization of ‘uint32_t addr’

Declaring and initializing a variable in the same statement after a goto
is allowed in C but not in C++; look at C++ specification Section 6.7
Paragraph 3.
(http://www.kuzbass.ru:8086/docs/isocpp/stmt.html#stmt.dcl)

Work around that by splitting 'addr' declaration and initialization.


No differences found