[asterisk-commits] mjordan: branch 11 r433693 - in /branches/11: apps/ cel/ codecs/gsm/src/ func...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 28 07:53:55 CDT 2015


Author: mjordan
Date: Sat Mar 28 07:53:50 2015
New Revision: 433693

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433693
Log:
clang compiler warnings: Fix a variety of "unused" warnings

This patch fixes the -Wunused-value -Wunused-variable -Wunused-const-variable
errors caught by clang. Specifically:

* apps/app_queue.c: removed unused qpm_cmd_usage[], qum_cmd_usage[],
                    qsmp_cmd_usage[]
* cel/cel_sqlite3_custom.c: removed unused name[] = "cel_sqlite3_custom"
* codecs/gsm/src/gsm_create.c: removed unused ident[] = "$Header$"
* funcs/func_env.c:729: Fixed ast_str_append_substr.
* main/editline/np/strlcat.c: removed unused rcsid variable
* main/editline/np/strlcpy.c: removed unused rcsid variable
* utils/conf2ael.c: removed unused cfextension_states
* utils/extconf.c: removed unused cfextension_states

Review: https://reviewboard.asterisk.org/r/4526

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4526.patch submitted by dkdegroot (License 6600)

Modified:
    branches/11/apps/app_queue.c
    branches/11/cel/cel_sqlite3_custom.c
    branches/11/codecs/gsm/src/gsm_create.c
    branches/11/funcs/func_env.c
    branches/11/main/editline/np/strlcat.c
    branches/11/main/editline/np/strlcpy.c
    branches/11/utils/conf2ael.c
    branches/11/utils/extconf.c

Modified: branches/11/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_queue.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/apps/app_queue.c (original)
+++ branches/11/apps/app_queue.c Sat Mar 28 07:53:50 2015
@@ -9636,15 +9636,6 @@
 	return CLI_SUCCESS;
 }
 
-static const char qpm_cmd_usage[] =
-"Usage: queue pause member <channel> in <queue> reason <reason>\n";
-
-static const char qum_cmd_usage[] =
-"Usage: queue unpause member <channel> in <queue> reason <reason>\n";
-
-static const char qsmp_cmd_usage[] =
-"Usage: queue set member penalty <channel> from <queue> <penalty>\n";
-
 static struct ast_cli_entry cli_queue[] = {
 	AST_CLI_DEFINE(queue_show, "Show status of a specified queue"),
 	AST_CLI_DEFINE(handle_queue_rule_show, "Show the rules defined in queuerules.conf"),

Modified: branches/11/cel/cel_sqlite3_custom.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/cel/cel_sqlite3_custom.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/cel/cel_sqlite3_custom.c (original)
+++ branches/11/cel/cel_sqlite3_custom.c Sat Mar 28 07:53:50 2015
@@ -61,7 +61,6 @@
 
 static const char config_file[] = "cel_sqlite3_custom.conf";
 
-static const char name[] = "cel_sqlite3_custom";
 static sqlite3 *db = NULL;
 
 static char table[80];

Modified: branches/11/codecs/gsm/src/gsm_create.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/codecs/gsm/src/gsm_create.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/codecs/gsm/src/gsm_create.c (original)
+++ branches/11/codecs/gsm/src/gsm_create.c Sat Mar 28 07:53:50 2015
@@ -3,8 +3,6 @@
  * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
  * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
  */
-
-static char const	ident[] = "$Header$";
 
 #include	"config.h"
 

Modified: branches/11/funcs/func_env.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/funcs/func_env.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/funcs/func_env.c (original)
+++ branches/11/funcs/func_env.c Sat Mar 28 07:53:50 2015
@@ -725,7 +725,7 @@
 				}
 			}
 			ast_debug(3, "length_offset=%" PRId64 ", length_offset - i=%" PRId64 "\n", length_offset, length_offset - i);
-			ast_str_append_substr(buf, len, fbuf, length_offset >= 0 ? length_offset - i : flength > i + sizeof(fbuf)) ? sizeof(fbuf) : flength - i;
+			ast_str_append_substr(buf, len, fbuf, (length_offset >= 0) ? length_offset - i : (flength > i + sizeof(fbuf)) ? sizeof(fbuf) : flength - i);
 
 			if (length_offset >= 0) {
 				break;

Modified: branches/11/main/editline/np/strlcat.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/editline/np/strlcat.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/main/editline/np/strlcat.c (original)
+++ branches/11/main/editline/np/strlcat.c Sat Mar 28 07:53:50 2015
@@ -26,14 +26,6 @@
  */
 
 #include "config.h"
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: src/lib/libc/string/strlcat.c,v 1.2.4.2 2001/07/09 23:30:06 obrien Exp $";
-#endif
-
 #include <sys/types.h>
 #include <string.h>
 

Modified: branches/11/main/editline/np/strlcpy.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/editline/np/strlcpy.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/main/editline/np/strlcpy.c (original)
+++ branches/11/main/editline/np/strlcpy.c Sat Mar 28 07:53:50 2015
@@ -28,16 +28,6 @@
  */
 
 #include "config.h"
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: src/lib/libc/string/strlcpy.c,v 1.2.4.1 2001/07/09 23:30:06 obrien Exp $";
-#endif
-
 #include <sys/types.h>
 #include <string.h>
 

Modified: branches/11/utils/conf2ael.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/utils/conf2ael.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/utils/conf2ael.c (original)
+++ branches/11/utils/conf2ael.c Sat Mar 28 07:53:50 2015
@@ -238,19 +238,6 @@
 
 AST_LIST_HEAD(store_hints, store_hint);
 
-static const struct cfextension_states {
-	int extension_state;
-	const char * const text;
-} extension_states[] = {
-	{ AST_EXTENSION_NOT_INUSE,                     "Idle" },
-	{ AST_EXTENSION_INUSE,                         "InUse" },
-	{ AST_EXTENSION_BUSY,                          "Busy" },
-	{ AST_EXTENSION_UNAVAILABLE,                   "Unavailable" },
-	{ AST_EXTENSION_RINGING,                       "Ringing" },
-	{ AST_EXTENSION_INUSE | AST_EXTENSION_RINGING, "InUse&Ringing" },
-	{ AST_EXTENSION_ONHOLD,                        "Hold" },
-	{ AST_EXTENSION_INUSE | AST_EXTENSION_ONHOLD,  "InUse&Hold" }
-};
 #define STATUS_NO_CONTEXT	1
 #define STATUS_NO_EXTENSION	2
 #define STATUS_NO_PRIORITY	3

Modified: branches/11/utils/extconf.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/utils/extconf.c?view=diff&rev=433693&r1=433692&r2=433693
==============================================================================
--- branches/11/utils/extconf.c (original)
+++ branches/11/utils/extconf.c Sat Mar 28 07:53:50 2015
@@ -3000,19 +3000,6 @@
 
 AST_LIST_HEAD(store_hints, store_hint);
 
-static const struct cfextension_states {
-	int extension_state;
-	const char * const text;
-} extension_states[] = {
-	{ AST_EXTENSION_NOT_INUSE,                     "Idle" },
-	{ AST_EXTENSION_INUSE,                         "InUse" },
-	{ AST_EXTENSION_BUSY,                          "Busy" },
-	{ AST_EXTENSION_UNAVAILABLE,                   "Unavailable" },
-	{ AST_EXTENSION_RINGING,                       "Ringing" },
-	{ AST_EXTENSION_INUSE | AST_EXTENSION_RINGING, "InUse&Ringing" },
-	{ AST_EXTENSION_ONHOLD,                        "Hold" },
-	{ AST_EXTENSION_INUSE | AST_EXTENSION_ONHOLD,  "InUse&Hold" }
-};
 #define STATUS_NO_CONTEXT	1
 #define STATUS_NO_EXTENSION	2
 #define STATUS_NO_PRIORITY	3




More information about the asterisk-commits mailing list