When AST_DEVMODE is not defined, ast_asserts are not compiled into the
binary. In some cases, this means variables are not referenced or are
set but unused which causes warnings to show up.
(closes issue ASTERISK-22446)
Reported by: Jason Parker (qwell)
........
Merged revisions 398521 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398522
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
char decoded[256] = {};
char *username;
char *password;
+#ifdef AST_DEVMODE
int cnt;
+#endif /* AST_DEVMODE */
if (strcasecmp("Authorization", v->name) != 0) {
continue;
/* This will truncate "userid:password" lines to
* sizeof(decoded). The array is long enough that this shouldn't
* be a problem */
- cnt = ast_base64decode((unsigned char*)decoded, base64,
+#ifdef AST_DEVMODE
+ cnt =
+#endif /* AST_DEVMODE */
+ ast_base64decode((unsigned char*)decoded, base64,
sizeof(decoded) - 1);
ast_assert(cnt < sizeof(decoded));
static void forwards_dtor(void *obj)
{
+#ifdef AST_DEVMODE
struct app_forwards *forwards = obj;
+#endif /* AST_DEVMODE */
ast_assert(forwards->topic_forward == NULL);
ast_assert(forwards->topic_cached_forward == NULL);