[asterisk-commits] kmoore: branch 12 r398521 - in /branches/12: main/http.c res/stasis/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 6 13:49:12 CDT 2013
Author: kmoore
Date: Fri Sep 6 13:49:09 2013
New Revision: 398521
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398521
Log:
Fix build warnings
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)
Modified:
branches/12/main/http.c
branches/12/res/stasis/app.c
Modified: branches/12/main/http.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/http.c?view=diff&rev=398521&r1=398520&r2=398521
==============================================================================
--- branches/12/main/http.c (original)
+++ branches/12/main/http.c Fri Sep 6 13:49:09 2013
@@ -914,7 +914,9 @@
char decoded[256] = {};
char *username;
char *password;
+#ifdef AST_DEVMODE
int cnt;
+#endif /* AST_DEVMODE */
if (strcasecmp("Authorization", v->name) != 0) {
continue;
@@ -939,7 +941,10 @@
/* 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));
Modified: branches/12/res/stasis/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/stasis/app.c?view=diff&rev=398521&r1=398520&r2=398521
==============================================================================
--- branches/12/res/stasis/app.c (original)
+++ branches/12/res/stasis/app.c Fri Sep 6 13:49:09 2013
@@ -68,7 +68,9 @@
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);
More information about the asterisk-commits
mailing list