suppress compiler warning
authorJason Parker <jparker@digium.com>
Tue, 29 Aug 2006 17:31:15 +0000 (17:31 +0000)
committerJason Parker <jparker@digium.com>
Tue, 29 Aug 2006 17:31:15 +0000 (17:31 +0000)
Code shamelessly borrowed from r41271 (it was the same warning/fix)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41274 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_sms.c

index aa9619b..8fd5ee6 100644 (file)
@@ -691,6 +691,7 @@ static void sms_readfile (sms_t * h, char *fn)
                while (fgets (line, sizeof (line), s))
                {                                                                /* process line in file */
                        char *p;
+                       void *pp = &p;
                        for (p = line; *p && *p != '\n' && *p != '\r'; p++);
                        *p = 0;                                  /* strip eoln */
                        p = line;
@@ -710,7 +711,7 @@ static void sms_readfile (sms_t * h, char *fn)
                                {                                                /* parse message (UTF-8) */
                                        unsigned char o = 0;
                                        while (*p && o < SMSLEN)
-                                               h->ud[o++] = utf8decode((unsigned char **) &p);
+                                               h->ud[o++] = utf8decode(pp);
                                        h->udl = o;
                                        if (*p)
                                                ast_log (LOG_WARNING, "UD too long in %s\n", fn);