Hi,
I've been doing another update of the OpenOCD Debian package today and
noticed some stuff which may be worth fixing upstream.
One of them is fixing a few compiler warnings (see attached patch) and
likely also one (non-cosmetic) bug (the 'id_buff' change, which seems to
be a buffer overflow).
More patches will follow.
HTH, Uwe.
--
http://www.hermann-uwe.de | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Index: src/helper/jim.c
===================================================================
--- src/helper/jim.c (Revision 1292)
+++ src/helper/jim.c (Arbeitskopie)
@@ -49,6 +49,7 @@
#define JIM_DYNLIB /* Dynamic library support for UNIX and WIN32 */
#endif /* JIM_ANSIC */
+#define _GNU_SOURCE /* for vasprintf() */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Index: src/jtag/usbprog.c
===================================================================
--- src/jtag/usbprog.c (Revision 1292)
+++ src/jtag/usbprog.c (Arbeitskopie)
@@ -93,7 +93,7 @@
struct usbprog_jtag * usbprog_jtag_handle;
-struct usbprog_jtag* usbprog_jtag_open();
+struct usbprog_jtag* usbprog_jtag_open(void);
void usbprog_jtag_close(struct usbprog_jtag *usbprog_jtag);
void usbprog_jtag_init(struct usbprog_jtag *usbprog_jtag);
unsigned char usbprog_jtag_message(struct usbprog_jtag *usbprog_jtag, char *msg, int msglen);
@@ -405,7 +405,7 @@
struct usb_bus *busses;
-struct usbprog_jtag* usbprog_jtag_open()
+struct usbprog_jtag* usbprog_jtag_open(void)
{
struct usb_bus *bus;
struct usb_device *dev;
Index: src/target/target.c
===================================================================
--- src/target/target.c (Revision 1292)
+++ src/target/target.c (Arbeitskopie)
@@ -4014,7 +4014,7 @@
static int fastload_num;
static struct FastLoad *fastload;
-static void free_fastload()
+static void free_fastload(void)
{
if (fastload!=NULL)
{
Index: src/flash/nand.c
===================================================================
--- src/flash/nand.c (Revision 1292)
+++ src/flash/nand.c (Arbeitskopie)
@@ -375,7 +375,7 @@
int nand_probe(struct nand_device_s *device)
{
u8 manufacturer_id, device_id;
- u8 id_buff[5];
+ u8 id_buff[6];
int retval;
int i;
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development