[asterisk-commits] mjordan: branch 13 r434188 - in /branches/13: ./ channels/ res/stasis_recording/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 6 21:03:23 CDT 2015


Author: mjordan
Date: Mon Apr  6 21:03:20 2015
New Revision: 434188

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434188
Log:
clang compiler warnings: Fix non-literal-null-conversion warnings

Clang will flag errors when a char pointer is set to '\0', as opposed to a
value that the char pointer points to. This patch fixes this warning
in a variety of locations.

Review: https://reviewboard.asterisk.org/r/4551

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4551.patch submitted by dkdegroot (License 6600)
........

Merged revisions 434187 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/13/   (props changed)
    branches/13/channels/chan_sip.c
    branches/13/channels/chan_skinny.c
    branches/13/res/stasis_recording/stored.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/13/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_sip.c?view=diff&rev=434188&r1=434187&r2=434188
==============================================================================
--- branches/13/channels/chan_sip.c (original)
+++ branches/13/channels/chan_sip.c Mon Apr  6 21:03:20 2015
@@ -19738,13 +19738,13 @@
 	char *oldcontext, *newcontext, *stalecontext, *stringp, newlist[AST_MAX_CONTEXT];
 
 	while ((oldcontext = strsep(&old, "&"))) {
-		stalecontext = '\0';
+		stalecontext = NULL;
 		ast_copy_string(newlist, new, sizeof(newlist));
 		stringp = newlist;
 		while ((newcontext = strsep(&stringp, "&"))) {
 			if (!strcmp(newcontext, oldcontext)) {
 				/* This is not the context you're looking for */
-				stalecontext = '\0';
+				stalecontext = NULL;
 				break;
 			} else if (strcmp(newcontext, oldcontext)) {
 				stalecontext = oldcontext;

Modified: branches/13/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_skinny.c?view=diff&rev=434188&r1=434187&r2=434188
==============================================================================
--- branches/13/channels/chan_skinny.c (original)
+++ branches/13/channels/chan_skinny.c Mon Apr  6 21:03:20 2015
@@ -2185,13 +2185,13 @@
 	char *oldcontext, *newcontext, *stalecontext, *stringp, newlist[AST_MAX_CONTEXT];
 
 	while ((oldcontext = strsep(&old, "&"))) {
-		stalecontext = '\0';
+		stalecontext = NULL;
 		ast_copy_string(newlist, new, sizeof(newlist));
 		stringp = newlist;
 		while ((newcontext = strsep(&stringp, "&"))) {
 			if (strcmp(newcontext, oldcontext) == 0) {
 				/* This is not the context you're looking for */
-				stalecontext = '\0';
+				stalecontext = NULL;
 				break;
 			} else if (strcmp(newcontext, oldcontext)) {
 				stalecontext = oldcontext;

Modified: branches/13/res/stasis_recording/stored.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/stasis_recording/stored.c?view=diff&rev=434188&r1=434187&r2=434188
==============================================================================
--- branches/13/res/stasis_recording/stored.c (original)
+++ branches/13/res/stasis_recording/stored.c Mon Apr  6 21:03:20 2015
@@ -470,7 +470,7 @@
 	/* Drop the extension if specified, core will do this for us */
 	format = strrchr(dst_file, '.');
 	if (format) {
-		format = '\0';
+		*format = '\0';
 	}
 
 	/* See if any intermediary directories need to be made */




More information about the asterisk-commits mailing list