avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2534] Submitted by George Spelvin:


From: j
Subject: [avr-libc-commit] [2534] Submitted by George Spelvin:
Date: Wed, 7 Dec 2016 19:51:44 +0000 (UTC)

Revision: 2534
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2534
Author:   joerg_wunsch
Date:     2016-12-07 19:51:44 +0000 (Wed, 07 Dec 2016)
Log Message:
-----------
Submitted by George Spelvin:

Remove some annoying GCC warnings.

Modified Paths:
--------------
    trunk/avr-libc/tests/simulate/stdlib/dtostre.h
    trunk/avr-libc/tests/simulate/stdlib/dtostrf.h

Modified: trunk/avr-libc/tests/simulate/stdlib/dtostre.h
===================================================================
--- trunk/avr-libc/tests/simulate/stdlib/dtostre.h      2016-12-06 23:01:54 UTC 
(rev 2533)
+++ trunk/avr-libc/tests/simulate/stdlib/dtostre.h      2016-12-07 19:51:44 UTC 
(rev 2534)
@@ -89,7 +89,7 @@
     unsigned char prec, flags;
     static char s[2*PZLEN + sizeof(pt->pattern)];
     char c, *ps;
-    const void *pv;
+    const char *pp;
     
     memset(s, testno, sizeof(s));
 
@@ -111,17 +111,17 @@
            exit (testno + 0x2000);
     }
 
-    pv = & pt->pattern;
+    pp = pt->pattern;
 #ifdef __AVR__
     do {
-       c = pgm_read_byte(pv++);
+       c = pgm_read_byte(pp++);
        if (*ps++ != c) {
            exit (testno + 0x3000);
        }
     } while (c);
 #else
     do {
-       c = *(char *)(pv++);
+       c = *pp++;
        if (*ps++ != c) {
            printf ("*** testno= %d:  must= %s  was= %s\n",
                testno, pt->pattern, s + PZLEN);

Modified: trunk/avr-libc/tests/simulate/stdlib/dtostrf.h
===================================================================
--- trunk/avr-libc/tests/simulate/stdlib/dtostrf.h      2016-12-06 23:01:54 UTC 
(rev 2533)
+++ trunk/avr-libc/tests/simulate/stdlib/dtostrf.h      2016-12-07 19:51:44 UTC 
(rev 2534)
@@ -74,7 +74,7 @@
     unsigned char prec;
     static char s[2*PZLEN + sizeof(pt->pattern)];
     char c, *ps;
-    void *pv;
+    char const *pp;
     
     memset (s, testno, sizeof(s));
 
@@ -96,17 +96,17 @@
            exit (testno + 0x2000);
     }
 
-    pv = & pt->pattern;
+    pp = pt->pattern;
 #ifdef __AVR__
     do {
-       c = pgm_read_byte(pv++);
+       c = pgm_read_byte(pp++);
        if (*ps++ != c) {
            exit (testno + 0x3000);
        }
     } while (c);
 #else
     do {
-       c = *(char *)(pv++);
+       c = *pp++;
        if (*ps++ != c) {
            printf ("*** testno= %d:  must= %s  was= %s\n",
                testno, pt->pattern, s + PZLEN);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]