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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@109459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2008-03-18 15:58:50 +00:00
parent 1df02c7c33
commit 4af367c3a9
31 changed files with 137 additions and 127 deletions

View File

@@ -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");