summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-12-29 22:07:21 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-12-29 22:07:39 +0100
commit4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7 (patch)
tree5143ec75e22a2f648a9375632948ce09a16ee642 /src/helper
parent8f93c0a3fe29313945a63b3f2154baef70acd796 (diff)
downloadopenocd+libswd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.tar.gz
openocd+libswd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.tar.bz2
openocd+libswd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.tar.xz
openocd+libswd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.zip
warnings: use more 'const' for char *
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/bin2char.c2
-rw-r--r--src/helper/command.c2
-rw-r--r--src/helper/command.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/helper/bin2char.c b/src/helper/bin2char.c
index 5bb4a6de..a214b63e 100644
--- a/src/helper/bin2char.c
+++ b/src/helper/bin2char.c
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
{
int c;
unsigned int n;
- char *name;
+ const char *name;
if (argc == 1) {
fprintf(stderr, "bin2char <varname>\n");
diff --git a/src/helper/command.c b/src/helper/command.c
index fd5e5f94..d5ac34b4 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -310,7 +310,7 @@ static void command_free(struct command *c)
}
if (c->name)
- free(c->name);
+ free((void *)c->name);
if (c->help)
free((void*)c->help);
if (c->usage)
diff --git a/src/helper/command.h b/src/helper/command.h
index 0ee66b09..3d1cdec8 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -173,7 +173,7 @@ typedef __COMMAND_HANDLER((*command_handler_t));
struct command
{
- char *name;
+ const char *name;
const char *help;
const char *usage;
struct command *parent;