diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-18 15:58:50 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-18 15:58:50 +0000 |
commit | 48d2267d2d05bf4acaa2ae4e00e3d9b600cce235 (patch) | |
tree | b91e3d85242f15336883bd197abbe86cd66fdfc8 /main/features.c | |
parent | 99e420ecd8ad845f253266482101298583994c00 (diff) |
Merged revisions 109447 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines
Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/main/features.c b/main/features.c index ff3ef50e7..0773ef4ba 100644 --- a/main/features.c +++ b/main/features.c @@ -2850,7 +2850,7 @@ static char *handle_feature_show(struct ast_cli_entry *e, int cmd, struct ast_cl { int i; struct ast_call_feature *feature; - char format[] = "%-25s %-7s %-7s\n"; +#define HFS_FORMAT "%-25s %-7s %-7s\n" switch (cmd) { @@ -2864,25 +2864,25 @@ static char *handle_feature_show(struct ast_cli_entry *e, int cmd, struct ast_cl return NULL; } - ast_cli(a->fd, format, "Builtin Feature", "Default", "Current"); - ast_cli(a->fd, format, "---------------", "-------", "-------"); + ast_cli(a->fd, HFS_FORMAT, "Builtin Feature", "Default", "Current"); + ast_cli(a->fd, HFS_FORMAT, "---------------", "-------", "-------"); - ast_cli(a->fd, format, "Pickup", "*8", ast_pickup_ext()); /* default hardcoded above, so we'll hardcode it here */ + ast_cli(a->fd, HFS_FORMAT, "Pickup", "*8", ast_pickup_ext()); /* default hardcoded above, so we'll hardcode it here */ ast_rwlock_rdlock(&features_lock); for (i = 0; i < FEATURES_COUNT; i++) - ast_cli(a->fd, format, builtin_features[i].fname, builtin_features[i].default_exten, builtin_features[i].exten); + ast_cli(a->fd, HFS_FORMAT, builtin_features[i].fname, builtin_features[i].default_exten, builtin_features[i].exten); ast_rwlock_unlock(&features_lock); ast_cli(a->fd, "\n"); - ast_cli(a->fd, format, "Dynamic Feature", "Default", "Current"); - ast_cli(a->fd, format, "---------------", "-------", "-------"); + ast_cli(a->fd, HFS_FORMAT, "Dynamic Feature", "Default", "Current"); + ast_cli(a->fd, HFS_FORMAT, "---------------", "-------", "-------"); if (AST_LIST_EMPTY(&feature_list)) ast_cli(a->fd, "(none)\n"); else { AST_LIST_LOCK(&feature_list); AST_LIST_TRAVERSE(&feature_list, feature, feature_entry) - ast_cli(a->fd, format, feature->sname, "no def", feature->exten); + ast_cli(a->fd, HFS_FORMAT, feature->sname, "no def", feature->exten); AST_LIST_UNLOCK(&feature_list); } ast_cli(a->fd, "\nCall parking\n"); |