[asterisk-commits] kmoore: trunk r398522 - in /trunk: ./ main/http.c res/stasis/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 6 13:53:34 CDT 2013
Author: kmoore
Date: Fri Sep 6 13:53:32 2013
New Revision: 398522
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398522
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)
........
Merged revisions 398521 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/http.c
trunk/res/stasis/app.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep 6 13:53:32 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511
+/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511,398521
Modified: trunk/main/http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/http.c?view=diff&rev=398522&r1=398521&r2=398522
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Fri Sep 6 13:53:32 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: trunk/res/stasis/app.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis/app.c?view=diff&rev=398522&r1=398521&r2=398522
==============================================================================
--- trunk/res/stasis/app.c (original)
+++ trunk/res/stasis/app.c Fri Sep 6 13:53:32 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