Hi all,
This patch fixes several warnings caused by -Wformat-security, which
appears to be the default in Ubuntu 8.10.
Cheers,
Zach
Index: src/helper/options.c
===================================================================
--- src/helper/options.c (revision 1478)
+++ src/helper/options.c (working copy)
@@ -54,7 +54,7 @@
int configuration_output_handler(struct command_context_s *context, const char* line)
{
- LOG_USER_N(line);
+ LOG_USER_N("%s", line);
return ERROR_OK;
}
Index: src/jtag/jlink.c
===================================================================
--- src/jtag/jlink.c (revision 1478)
+++ src/jtag/jlink.c (working copy)
@@ -537,7 +537,7 @@
if (result == len)
{
usb_in_buffer[result] = 0;
- LOG_INFO((char *)usb_in_buffer);
+ LOG_INFO("%s", (char *)usb_in_buffer);
return ERROR_OK;
}
}
Index: src/jtag/arm-jtag-ew.c
===================================================================
--- src/jtag/arm-jtag-ew.c (revision 1478)
+++ src/jtag/arm-jtag-ew.c (working copy)
@@ -896,7 +896,7 @@
snprintf(s, 4, " %02x", buffer[j]);
strcat(line, s);
}
- LOG_DEBUG(line);
+ LOG_DEBUG("%s", line);
}
}
#endif
Index: src/jtag/vsllink.c
===================================================================
--- src/jtag/vsllink.c (revision 1478)
+++ src/jtag/vsllink.c (working copy)
@@ -468,7 +468,7 @@
vsllink_usb_in_buffer[result] = 0;
VSLLINK_BufferSize = vsllink_usb_in_buffer[0] + (vsllink_usb_in_buffer[1] << 8);
strncpy(version_str, (char *)vsllink_usb_in_buffer + 2, sizeof(version_str));
- LOG_INFO(version_str);
+ LOG_INFO("%s", version_str);
// free the pre-alloc memroy
free(vsllink_usb_in_buffer);
@@ -1446,6 +1446,6 @@
snprintf(s, 4, " %02x", buffer[j]);
strcat(line, s);
}
- LOG_DEBUG(line);
+ LOG_DEBUG("%s", line);
}
}
Index: src/target/target.c
===================================================================
--- src/target/target.c (revision 1478)
+++ src/target/target.c (working copy)
@@ -3961,7 +3961,7 @@
};
LOG_DEBUG("Target command params:");
- LOG_DEBUG(Jim_Debug_ArgvString( interp, argc, argv) );
+ LOG_DEBUG("%s", Jim_Debug_ArgvString(interp, argc, argv));
cmd_ctx = Jim_GetAssocData( interp, "context" );
Index: src/xsvf/xsvf.c
===================================================================
--- src/xsvf/xsvf.c (revision 1478)
+++ src/xsvf/xsvf.c (working copy)
@@ -761,7 +761,7 @@
comment[sizeof(comment)-1] = 0; /* regardless, terminate */
if (verbose)
- LOG_USER(comment);
+ LOG_USER("%s", comment);
}
break;
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development