Author: mjordan
Date: Mon Apr  6 21:03:48 2015
New Revision: 434189

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434189
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
........

Merged revisions 434188 from http://svn.asterisk.org/svn/asterisk/branches/13

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

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

Modified: trunk/channels/chan_sip.c
URL: 
http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=434189&r1=434188&r2=434189
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Apr  6 21:03:48 2015
@@ -19728,13 +19728,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: trunk/channels/chan_skinny.c
URL: 
http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=434189&r1=434188&r2=434189
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Apr  6 21:03:48 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: trunk/res/stasis_recording/stored.c
URL: 
http://svnview.digium.com/svn/asterisk/trunk/res/stasis_recording/stored.c?view=diff&rev=434189&r1=434188&r2=434189
==============================================================================
--- trunk/res/stasis_recording/stored.c (original)
+++ trunk/res/stasis_recording/stored.c Mon Apr  6 21:03:48 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 */


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to