You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asterisk-voicemail/debian/patches/sipwise_vm_fix_compile_warn...

63 lines
2.7 KiB

From: Sipwise Development Team <support@sipwise.com>
Date: Mon, 4 Nov 2024 15:37:29 +0100
Subject: sipwise_vm_fix_compile_warnings
---
Makefile | 3 ++-
apps/app_voicemail.c | 9 ++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index ad0c960..fc52c48 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,8 @@ DEBUG=-g
LIBS+=-lpcre
CFLAGS+=-pipe -fPIC
-CFLAGS+=-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
+CFLAGS+=-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
+ -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable
CFLAGS+=-D_REENTRANT -D_GNU_SOURCE -DODBC_STORAGE
all: _all
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index af86182..817c32c 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5063,16 +5063,11 @@ static int vm_delete(char *file)
static void prep_pager_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu, char *cidnum, char *dur, char *date)
{
- struct ast_config *msg_cfg;
- struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
-
/* Prepare variables for substitution in pager body */
pbx_builtin_setvar_helper(ast, "VM_DUR", dur);
pbx_builtin_setvar_helper(ast, "VM_MAILBOX", vmu->dialed_num);
pbx_builtin_setvar_helper(ast, "VM_CIDNUM", (!ast_strlen_zero(cidnum) ? cidnum : "anonymous"));
pbx_builtin_setvar_helper(ast, "VM_DATE", date);
-
- ast_config_destroy(msg_cfg);
}
static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, char *dur, char *date, const char *category, const char *flag)
@@ -5121,7 +5116,7 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu
}
if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%30d", &inttime) == 1) {
- struct timeval tv = { inttime, };
+ struct timeval tv = { inttime, 0 };
struct ast_tm tm;
ast_localtime(&tv, &tm, NULL);
ast_strftime_locale(origdate, sizeof(origdate), emaildateformat, &tm, S_OR(vmu->locale, NULL));
@@ -5522,7 +5517,7 @@ static void make_email_file(FILE *p,
/* You might be tempted to do origdate, except that a) it's in the wrong
* format, and b) it's missing for IMAP recordings. */
if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%30d", &inttime) == 1) {
- struct timeval tv = { inttime, };
+ struct timeval tv = { inttime, 0 };
struct ast_tm tm;
ast_localtime(&tv, &tm, NULL);
ast_strftime_locale(origdate, sizeof(origdate), emaildateformat, &tm, S_OR(vmu->locale, NULL));