summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-20 01:10:11 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-20 01:10:11 +0300
commitefcfad7c009502b2951a2408df3a94b83934e288 (patch)
tree464e9094844e5a7e4e80a476088491608bed939e /tools
parent0c1d6232e7b4c39d33dfcc759bd19f050d7953e7 (diff)
Get rid of format string warnings with recent gcc versions
Recent gcc versions, like 4.3.2 from ubuntu intrepid, give warnings like "format not a string literal and no format arguments" without this patch.
Diffstat (limited to 'tools')
-rw-r--r--tools/hciconfig.c2
-rw-r--r--tools/hcitool.c84
-rw-r--r--tools/sdptool.c32
3 files changed, 59 insertions, 59 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 25dda601..7c595f08 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -693,7 +693,7 @@ static void cmd_class(int ctl, int hdev, char *opt)
if (cls[2] & (1 << s)) {
if (!first)
printf(", ");
- printf(services[s]);
+ printf("%s", services[s]);
first = 0;
}
} else
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 1b9663eb..c769b417 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -381,7 +381,7 @@ static void cmd_dev(int dev_id, int argc, char **argv)
for_each_opt(opt, dev_options, NULL) {
switch (opt) {
default:
- printf(dev_help);
+ printf("%s", dev_help);
return;
}
}
@@ -451,7 +451,7 @@ static void cmd_inq(int dev_id, int argc, char **argv)
break;
default:
- printf(inq_help);
+ printf("%s", inq_help);
return;
}
}
@@ -567,7 +567,7 @@ static void cmd_scan(int dev_id, int argc, char **argv)
break;
default:
- printf(scan_help);
+ printf("%s", scan_help);
return;
}
}
@@ -774,7 +774,7 @@ static void cmd_name(int dev_id, int argc, char **argv)
for_each_opt(opt, name_options, NULL) {
switch (opt) {
default:
- printf(name_help);
+ printf("%s", name_help);
return;
}
}
@@ -782,7 +782,7 @@ static void cmd_name(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(name_help);
+ printf("%s", name_help);
return;
}
@@ -833,7 +833,7 @@ static void cmd_info(int dev_id, int argc, char **argv)
for_each_opt(opt, info_options, NULL) {
switch (opt) {
default:
- printf(info_help);
+ printf("%s", info_help);
return;
}
}
@@ -841,7 +841,7 @@ static void cmd_info(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(info_help);
+ printf("%s", info_help);
return;
}
@@ -974,7 +974,7 @@ static void cmd_spinq(int dev_id, int argc, char **argv)
for_each_opt(opt, spinq_options, NULL) {
switch (opt) {
default:
- printf(spinq_help);
+ printf("%s", spinq_help);
return;
}
}
@@ -1027,7 +1027,7 @@ static void cmd_epinq(int dev_id, int argc, char **argv)
for_each_opt(opt, epinq_options, NULL) {
switch (opt) {
default:
- printf(epinq_help);
+ printf("%s", epinq_help);
return;
}
}
@@ -1075,7 +1075,7 @@ static void cmd_cmd(int dev_id, int argc, char **argv)
for_each_opt(opt, cmd_options, NULL) {
switch (opt) {
default:
- printf(cmd_help);
+ printf("%s", cmd_help);
return;
}
}
@@ -1083,7 +1083,7 @@ static void cmd_cmd(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 2) {
- printf(cmd_help);
+ printf("%s", cmd_help);
return;
}
@@ -1094,7 +1094,7 @@ static void cmd_cmd(int dev_id, int argc, char **argv)
ogf = strtol(argv[0], NULL, 16);
ocf = strtol(argv[1], NULL, 16);
if (errno == ERANGE || (ogf > 0x3f) || (ocf > 0x3ff)) {
- printf(cmd_help);
+ printf("%s", cmd_help);
return;
}
@@ -1158,7 +1158,7 @@ static void cmd_con(int dev_id, int argc, char **argv)
for_each_opt(opt, con_options, NULL) {
switch (opt) {
default:
- printf(con_help);
+ printf("%s", con_help);
return;
}
}
@@ -1206,7 +1206,7 @@ static void cmd_cc(int dev_id, int argc, char **argv)
break;
default:
- printf(cc_help);
+ printf("%s", cc_help);
return;
}
}
@@ -1214,7 +1214,7 @@ static void cmd_cc(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(cc_help);
+ printf("%s", cc_help);
return;
}
@@ -1262,7 +1262,7 @@ static void cmd_dc(int dev_id, int argc, char **argv)
for_each_opt(opt, dc_options, NULL) {
switch (opt) {
default:
- printf(dc_help);
+ printf("%s", dc_help);
return;
}
}
@@ -1270,7 +1270,7 @@ static void cmd_dc(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(dc_help);
+ printf("%s", dc_help);
return;
}
@@ -1333,7 +1333,7 @@ static void cmd_sr(int dev_id, int argc, char **argv)
for_each_opt(opt, sr_options, NULL) {
switch (opt) {
default:
- printf(sr_help);
+ printf("%s", sr_help);
return;
}
}
@@ -1341,7 +1341,7 @@ static void cmd_sr(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 2) {
- printf(sr_help);
+ printf("%s", sr_help);
return;
}
@@ -1401,7 +1401,7 @@ static void cmd_rssi(int dev_id, int argc, char **argv)
for_each_opt(opt, rssi_options, NULL) {
switch (opt) {
default:
- printf(rssi_help);
+ printf("%s", rssi_help);
return;
}
}
@@ -1409,7 +1409,7 @@ static void cmd_rssi(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(rssi_help);
+ printf("%s", rssi_help);
return;
}
@@ -1475,7 +1475,7 @@ static void cmd_lq(int dev_id, int argc, char **argv)
for_each_opt(opt, lq_options, NULL) {
switch (opt) {
default:
- printf(lq_help);
+ printf("%s", lq_help);
return;
}
}
@@ -1483,7 +1483,7 @@ static void cmd_lq(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(lq_help);
+ printf("%s", lq_help);
return;
}
@@ -1550,7 +1550,7 @@ static void cmd_tpl(int dev_id, int argc, char **argv)
for_each_opt(opt, tpl_options, NULL) {
switch (opt) {
default:
- printf(tpl_help);
+ printf("%s", tpl_help);
return;
}
}
@@ -1558,7 +1558,7 @@ static void cmd_tpl(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(tpl_help);
+ printf("%s", tpl_help);
return;
}
@@ -1627,7 +1627,7 @@ static void cmd_afh(int dev_id, int argc, char **argv)
for_each_opt(opt, afh_options, NULL) {
switch (opt) {
default:
- printf(afh_help);
+ printf("%s", afh_help);
return;
}
}
@@ -1635,7 +1635,7 @@ static void cmd_afh(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(afh_help);
+ printf("%s", afh_help);
return;
}
@@ -1713,7 +1713,7 @@ static void cmd_cpt(int dev_id, int argc, char **argv)
for_each_opt(opt, cpt_options, NULL) {
switch (opt) {
default:
- printf(cpt_help);
+ printf("%s", cpt_help);
return;
}
}
@@ -1721,7 +1721,7 @@ static void cmd_cpt(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 2) {
- printf(cpt_help);
+ printf("%s", cpt_help);
return;
}
@@ -1798,7 +1798,7 @@ static void cmd_lp(int dev_id, int argc, char **argv)
for_each_opt(opt, lp_options, NULL) {
switch (opt) {
default:
- printf(lp_help);
+ printf("%s", lp_help);
return;
}
}
@@ -1806,7 +1806,7 @@ static void cmd_lp(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(lp_help);
+ printf("%s", lp_help);
return;
}
@@ -1897,7 +1897,7 @@ static void cmd_lst(int dev_id, int argc, char **argv)
for_each_opt(opt, lst_options, NULL) {
switch (opt) {
default:
- printf(lst_help);
+ printf("%s", lst_help);
return;
}
}
@@ -1905,7 +1905,7 @@ static void cmd_lst(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(lst_help);
+ printf("%s", lst_help);
return;
}
@@ -1987,7 +1987,7 @@ static void cmd_auth(int dev_id, int argc, char **argv)
for_each_opt(opt, auth_options, NULL) {
switch (opt) {
default:
- printf(auth_help);
+ printf("%s", auth_help);
return;
}
}
@@ -1995,7 +1995,7 @@ static void cmd_auth(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(auth_help);
+ printf("%s", auth_help);
return;
}
@@ -2059,7 +2059,7 @@ static void cmd_enc(int dev_id, int argc, char **argv)
for_each_opt(opt, enc_options, NULL) {
switch (opt) {
default:
- printf(enc_help);
+ printf("%s", enc_help);
return;
}
}
@@ -2067,7 +2067,7 @@ static void cmd_enc(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(enc_help);
+ printf("%s", enc_help);
return;
}
@@ -2132,7 +2132,7 @@ static void cmd_key(int dev_id, int argc, char **argv)
for_each_opt(opt, key_options, NULL) {
switch (opt) {
default:
- printf(key_help);
+ printf("%s", key_help);
return;
}
}
@@ -2140,7 +2140,7 @@ static void cmd_key(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(key_help);
+ printf("%s", key_help);
return;
}
@@ -2204,7 +2204,7 @@ static void cmd_clkoff(int dev_id, int argc, char **argv)
for_each_opt(opt, clkoff_options, NULL) {
switch (opt) {
default:
- printf(clkoff_help);
+ printf("%s", clkoff_help);
return;
}
}
@@ -2212,7 +2212,7 @@ static void cmd_clkoff(int dev_id, int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(clkoff_help);
+ printf("%s", clkoff_help);
return;
}
@@ -2280,7 +2280,7 @@ static void cmd_clock(int dev_id, int argc, char **argv)
for_each_opt(opt, clock_options, NULL) {
switch (opt) {
default:
- printf(clock_help);
+ printf("%s", clock_help);
return;
}
}
diff --git a/tools/sdptool.c b/tools/sdptool.c
index e2f2a29d..b294cf42 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -828,7 +828,7 @@ static int cmd_setattr(int argc, char **argv)
for_each_opt(opt, set_options, NULL) {
switch(opt) {
default:
- printf(set_help);
+ printf("%s", set_help);
return -1;
}
}
@@ -837,7 +837,7 @@ static int cmd_setattr(int argc, char **argv)
argv += optind;
if (argc < 3) {
- printf(set_help);
+ printf("%s", set_help);
return -1;
}
@@ -967,7 +967,7 @@ static int cmd_setseq(int argc, char **argv)
for_each_opt(opt, seq_options, NULL) {
switch(opt) {
default:
- printf(seq_help);
+ printf("%s", seq_help);
return -1;
}
}
@@ -976,7 +976,7 @@ static int cmd_setseq(int argc, char **argv)
argv += optind;
if (argc < 3) {
- printf(seq_help);
+ printf("%s", seq_help);
return -1;
}
@@ -3493,7 +3493,7 @@ static int cmd_add(int argc, char **argv)
si.network = strtol(optarg + 2, NULL, 16);
break;
default:
- printf(add_help);
+ printf("%s", add_help);
return -1;
}
}
@@ -3502,7 +3502,7 @@ static int cmd_add(int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(add_help);
+ printf("%s", add_help);
return -1;
}
@@ -3569,7 +3569,7 @@ static int cmd_del(int argc, char **argv)
for_each_opt(opt, del_options, 0) {
switch (opt) {
default:
- printf(del_help);
+ printf("%s", del_help);
return -1;
}
}
@@ -3578,7 +3578,7 @@ static int cmd_del(int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(del_help);
+ printf("%s", del_help);
return -1;
}
@@ -3606,7 +3606,7 @@ static void inquiry(handler_t handler, void *arg)
static void doprintf(void *data, const char *str)
{
- printf(str);
+ printf("%s", str);
}
/*
@@ -3739,7 +3739,7 @@ static int cmd_browse(int argc, char **argv)
sdp_uuid16_create(&context.group, L2CAP_UUID);
break;
default:
- printf(browse_help);
+ printf("%s", browse_help);
return -1;
}
}
@@ -3807,7 +3807,7 @@ static int cmd_search(int argc, char **argv)
context.view = XML_VIEW;
break;
default:
- printf(search_help);
+ printf("%s", search_help);
return -1;
}
}
@@ -3816,7 +3816,7 @@ static int cmd_search(int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(search_help);
+ printf("%s", search_help);
return -1;
}
@@ -3956,7 +3956,7 @@ static int cmd_records(int argc, char **argv)
context.view = XML_VIEW;
break;
default:
- printf(records_help);
+ printf("%s", records_help);
return -1;
}
}
@@ -3965,7 +3965,7 @@ static int cmd_records(int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(records_help);
+ printf("%s", records_help);
return -1;
}
@@ -4026,7 +4026,7 @@ static int cmd_get(int argc, char **argv)
context.view = XML_VIEW;
break;
default:
- printf(get_help);
+ printf("%s", get_help);
return -1;
}
}
@@ -4035,7 +4035,7 @@ static int cmd_get(int argc, char **argv)
argv += optind;
if (argc < 1) {
- printf(get_help);
+ printf("%s", get_help);
return -1;
}