[Asterisk-code-review] Compiler fixes for GCC with -Og (asterisk[16])

Friendly Automation asteriskteam at digium.com
Tue Nov 3 16:35:12 CST 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15078 )

Change subject: Compiler fixes for GCC with -Og
......................................................................

Compiler fixes for GCC with -Og

ASTERISK-29144

Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62
---
M addons/ooh323c/src/ooq931.c
M apps/app_directory.c
M apps/app_voicemail.c
M funcs/func_odbc.c
4 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, approved
  George Joseph: Looks good to me, but someone else must approve
  Friendly Automation: Approved for Submit



diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c
index 01a8e4a..fc18703 100644
--- a/addons/ooh323c/src/ooq931.c
+++ b/addons/ooh323c/src/ooq931.c
@@ -585,7 +585,7 @@
    unsigned int i;
    ASN1BOOL aligned=TRUE;
    int stat;
-   Q931InformationElement *ie;
+   Q931InformationElement *ie=NULL;
    /* OOCTXT *pctxt = &gH323ep.msgctxt; */
    if(q931Msg ==NULL)
    {
diff --git a/apps/app_directory.c b/apps/app_directory.c
index a47fe3b..36da702 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -396,7 +396,7 @@
 {
 	struct directory_item **block, *item;
 	int i, limit, res = 0;
-	char buf[9];
+	char buf[7+12]; /* INT_MIN has a length of 12 chars */
 
 	/* option p(n): cellphone pause option */
 	select_item_pause(chan, flags, opts);
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index e7ab964..940ca67 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11303,7 +11303,7 @@
 			int skipuser, int max_logins, int silent)
 {
 	int useadsi = 0, valid = 0, logretries = 0;
-	char password[AST_MAX_EXTENSION], *passptr;
+	char password[AST_MAX_EXTENSION], *passptr = NULL;
 	struct ast_vm_user vmus, *vmu = NULL;
 
 	/* If ADSI is supported, setup login screen */
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index e9fe597..acebdcc 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1181,7 +1181,7 @@
 static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_query **query)
 {
 	const char *tmp;
-	const char *tmp2;
+	const char *tmp2 = NULL;
 	int i;
 
 	if (!cfg || !catg) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15078
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62
Gerrit-Change-Number: 15078
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201103/c0ee2677/attachment.html>


More information about the asterisk-code-review mailing list