diff --git a/apps/app_queue.c b/apps/app_queue.c
index 668be42b2953868a4025e394235da51bff7306ee..7b4faf0c058e1d5b49c7ea13b311729b2c7aa82f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -10346,15 +10346,6 @@ static char *handle_queue_reload(struct ast_cli_entry *e, int cmd, struct ast_cl
 	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"),
diff --git a/cel/cel_sqlite3_custom.c b/cel/cel_sqlite3_custom.c
index 2ea78d08625a955a3321eb6020598264762ad4c0..afa99f7dcebec2edad831566e9cb70d2dd7956c2 100644
--- a/cel/cel_sqlite3_custom.c
+++ b/cel/cel_sqlite3_custom.c
@@ -63,7 +63,6 @@ AST_MUTEX_DEFINE_STATIC(lock);
 
 static const char config_file[] = "cel_sqlite3_custom.conf";
 
-static const char name[] = "cel_sqlite3_custom";
 static sqlite3 *db = NULL;
 
 static char table[80];
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index c4cdca83abdfec561ea03e84c907abeab28a6be6..28ddc76302dc549f443c1401292738bbe7e93cba 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -73,7 +73,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 AST_THREADSTORAGE(uniqueid_threadbuf);
 #define UNIQUEID_BUFSIZE 256
 
-static const char desc[] = "PJSIP Channel";
 static const char channel_type[] = "PJSIP";
 
 static unsigned int chan_idx;
diff --git a/codecs/gsm/src/gsm_create.c b/codecs/gsm/src/gsm_create.c
index a59aa2f2a38335b87ac0d943a5b1787bd3450ae2..f952a7dc2c798ca07d0b3414cb2a6bb99c296713 100644
--- a/codecs/gsm/src/gsm_create.c
+++ b/codecs/gsm/src/gsm_create.c
@@ -4,8 +4,6 @@
  * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
  */
 
-static char const	ident[] = "$Header$";
-
 #include	"config.h"
 
 #ifdef	HAS_STRING_H
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 26bd09c139525f958a0ecad4d54a7b6ef0b9bc4d..3c260a2fb3a168ac9d1ebc3ae88097dc6bfa693a 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -725,7 +725,7 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru
 				}
 			}
 			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;
diff --git a/main/editline/np/strlcat.c b/main/editline/np/strlcat.c
index 6c9f1e92d797422608f07d8c07f33843904789a8..d9d0e72c8f3f9bbf0a93a77fa890b9b3c9881e92 100644
--- a/main/editline/np/strlcat.c
+++ b/main/editline/np/strlcat.c
@@ -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>
 
diff --git a/main/editline/np/strlcpy.c b/main/editline/np/strlcpy.c
index 1f154bcf2ea75d2eb9cb7fdc7b741b6c31e8524f..ecad62b499e3a0c4a4a0888d6bd6212d18562b29 100644
--- a/main/editline/np/strlcpy.c
+++ b/main/editline/np/strlcpy.c
@@ -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>
 
diff --git a/main/features.c b/main/features.c
index deb28ee0fbfaa6bd53038965d6f51eb41a34aac5..f3bf7a71436e2c21b3513e9ffddd91f0f1ea83d6 100644
--- a/main/features.c
+++ b/main/features.c
@@ -318,11 +318,6 @@ struct ast_bridge_thread_obj
 	unsigned int return_to_pbx:1;
 };
 
-static const struct ast_datastore_info channel_app_data_datastore = {
-	.type = "Channel appdata datastore",
-	.destroy = ast_free_ptr,
-};
-
 static void set_config_flags(struct ast_channel *chan, struct ast_bridge_config *config)
 {
 	ast_clear_flag(config, AST_FLAGS_ALL);
diff --git a/main/security_events.c b/main/security_events.c
index 00a70fbec541b9f74ad05febc375a5088493ad7d..0546bfe73804eab09fc8c0049efcb90ad67736d2 100644
--- a/main/security_events.c
+++ b/main/security_events.c
@@ -374,7 +374,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/json.h"
 #include "asterisk/astobj2.h"
 
-static const size_t TIMESTAMP_STR_LEN = 32;
 static const size_t SECURITY_EVENT_BUF_INIT_LEN = 256;
 
 /*! \brief Security Topic */
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index d0f4c6e1365778b7b7af165db6d6db6797c3b37a..5d36f4231abbe07537bc633c88d38565719d75ef 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -237,19 +237,6 @@ struct store_hint {
 
 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
diff --git a/utils/extconf.c b/utils/extconf.c
index 051ce7978f5ae0366109a6ab9d9e4447eb98e56d..ed155e2573c10886e0e73398a9fccc70e6af9955 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -3011,19 +3011,6 @@ struct store_hint {
 
 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