This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More GCC/4.2.x casting


Trying to keep compilation clean, even when GCC is a bit
too pedantic...

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
Index: language/c/libc/i18n/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/i18n/current/ChangeLog,v
retrieving revision 1.11
diff -u -5 -p -r1.11 ChangeLog
--- language/c/libc/i18n/current/ChangeLog	29 Aug 2006 20:26:11 -0000	1.11
+++ language/c/libc/i18n/current/ChangeLog	2 Jul 2007 11:45:42 -0000
@@ -1,5 +1,9 @@
+2007-07-02  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/locale.cxx: Add (char *) casts to make GCC/4.2.x happy.
+
 2006-08-28  Sergei Gavrikov  <w3sg@SoftHome.net>
 
 	* src/wcstombs.cxx (wcstombs): unused variable removed.
 
 2006-08-11  Jonathan Larmour  <jifl@eCosCentric.com>
Index: language/c/libc/i18n/current/src/locale.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/i18n/current/src/locale.cxx,v
retrieving revision 1.4
diff -u -5 -p -r1.4 locale.cxx
--- language/c/libc/i18n/current/src/locale.cxx	23 May 2002 23:07:06 -0000	1.4
+++ language/c/libc/i18n/current/src/locale.cxx	2 Jul 2007 11:43:41 -0000
@@ -68,12 +68,12 @@
 // CONSTANTS
 
 // define the "C" locale
 static const Cyg_libc_locale_t
 C_locale = { 
-  "C",
-  { ".", "", "", "", "", "", "", "", "", "",
+  (char *)"C",
+  { (char *)".", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"",
     CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
     CHAR_MAX, CHAR_MAX
   },
   1,
   NULL,
Index: language/c/libc/startup/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/startup/current/ChangeLog,v
retrieving revision 1.8
diff -u -5 -p -r1.8 ChangeLog
--- language/c/libc/startup/current/ChangeLog	7 Mar 2003 11:35:37 -0000	1.8
+++ language/c/libc/startup/current/ChangeLog	2 Jul 2007 11:46:21 -0000
@@ -1,5 +1,9 @@
+2007-07-02  Gary Thomas  <gary@mlbassoc.com>
+
+	* cdl/startup.cdl: Add (char *) casts to make GCC/4.2.x happy.
+
 2003-03-07  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* src/mainthread.cxx: Align stack to relevant architecture alignment.
 
 2003-02-24  Jonathan Larmour  <jifl@eCosCentric.com>
Index: language/c/libc/startup/current/cdl/startup.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/startup/current/cdl/startup.cdl,v
retrieving revision 1.6
diff -u -5 -p -r1.6 startup.cdl
--- language/c/libc/startup/current/cdl/startup.cdl	24 Feb 2003 14:27:31 -0000	1.6
+++ language/c/libc/startup/current/cdl/startup.cdl	2 Jul 2007 11:43:41 -0000
@@ -86,11 +86,11 @@ cdl_package CYGPKG_LIBC_STARTUP {
     }
 
     cdl_option CYGDAT_LIBC_ARGUMENTS {
         display       "Arguments to main()"
         flavor        data
-        default_value {"{\"\", NULL}"}
+        default_value {"{(char *)\"\", (char *)NULL}"}
         description   "
             This option allows the setting of the arguments
             to the main function. This only has any effect
             when cyg_iso_c_start() is used to start the
             ISO C compatibility. This will automatically
Index: language/c/libc/stdio/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/stdio/current/ChangeLog,v
retrieving revision 1.41
diff -u -5 -p -r1.41 ChangeLog
--- language/c/libc/stdio/current/ChangeLog	28 Feb 2007 23:01:11 -0000	1.41
+++ language/c/libc/stdio/current/ChangeLog	2 Jul 2007 11:47:04 -0000
@@ -1,5 +1,9 @@
+2007-07-02  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/output/vfnprintf.cxx: Add (char *) casts to make GCC/4.2.x happy.
+
 2007-02-05  Sergei Organov  <osv@javad.com>
 
 	* src/output/vfnprintf.cxx (vfnprintf): while formatting integers
 	in decimal, convert the value to unsigned long from unsigned long
 	long before processing, unless we actually print long long
Index: language/c/libc/stdio/current/src/output/vfnprintf.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/stdio/current/src/output/vfnprintf.cxx,v
retrieving revision 1.12
diff -u -5 -p -r1.12 vfnprintf.cxx
--- language/c/libc/stdio/current/src/output/vfnprintf.cxx	28 Feb 2007 23:01:12 -0000	1.12
+++ language/c/libc/stdio/current/src/output/vfnprintf.cxx	2 Jul 2007 11:43:41 -0000
@@ -474,17 +474,17 @@ reswitch:       switch (ch) {
                          *      -- ANSI X3J11
                          */
                         /* NOSTRICT */
                         _uquad = (unsigned long)va_arg(arg, void *);
                         base = HEX;
-                        xdigs = "0123456789abcdef";
+                        xdigs = (char *)"0123456789abcdef";
                         flags |= HEXPREFIX;
                         ch = 'x';
                         goto nosign;
                 case 's':
                         if ((cp = va_arg(arg, char *)) == NULL)
-                                cp = "(null)";
+                                cp = (char *)"(null)";
                         if (prec >= 0) {
                                 /*
                                  * can't use strlen; can only look for the
                                  * NUL in the first `prec' characters, and
                                  * strlen() will go further.
@@ -507,14 +507,14 @@ reswitch:       switch (ch) {
                 case 'u':
                         _uquad = UARG();
                         base = DEC;
                         goto nosign;
                 case 'X':
-                        xdigs = "0123456789ABCDEF";
+                        xdigs = (char *)"0123456789ABCDEF";
                         goto hex;
                 case 'x':
-                        xdigs = "0123456789abcdef";
+                        xdigs = (char *)"0123456789abcdef";
 hex:                    _uquad = UARG();
                         base = HEX;
                         /* leading 0x/X only if non-zero */
                         if (flags & ALT && _uquad != 0)
                                 flags |= HEXPREFIX;
@@ -581,11 +581,11 @@ number:                 if ((dprec = pre
                                                 _uquad >>= 4;
                                         } while (_uquad);
                                         break;
 
                                 default:
-                                        cp = "bug in vfprintf: bad base";
+                                        cp = (char *)"bug in vfprintf: bad base";
                                         size = strlen(cp);
                                         goto skipsize;
                                 }
                         }
                         size = buf + BUF - cp;
Index: kernel/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.142
diff -u -5 -p -r1.142 ChangeLog
--- kernel/current/ChangeLog	11 Jun 2007 13:23:45 -0000	1.142
+++ kernel/current/ChangeLog	2 Jul 2007 11:48:18 -0000
@@ -1,5 +1,11 @@
+2007-07-02  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/debug/dbg_gdb.cxx: 
+	* src/common/thread.cxx (Cyg_IdleThread): Add (char *) casts
+	to make GCC/4.2.x happy.
+
 2007-06-11  Nick Garnett  <nickg@ecoscentric.com>
 
 	* tests/klock.c (entry0, entry1): Modify mbox part of test to
 	reflect use of plain mbox implementation. The precise ordering of
 	events is slightly different.
Index: kernel/current/src/common/thread.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/kernel/current/src/common/thread.cxx,v
retrieving revision 1.22
diff -u -5 -p -r1.22 thread.cxx
--- kernel/current/src/common/thread.cxx	19 Jan 2006 17:53:58 -0000	1.22
+++ kernel/current/src/common/thread.cxx	2 Jul 2007 11:43:41 -0000
@@ -1266,11 +1266,11 @@ Cyg_IdleThread idle_thread[CYGNUM_KERNEL
 
 Cyg_IdleThread::Cyg_IdleThread()
     : Cyg_Thread( CYG_THREAD_MIN_PRIORITY,
                   idle_thread_main,
                   0,
-                  "Idle Thread",
+                  (char *)"Idle Thread",
                   (CYG_ADDRESS)idle_thread_stack[this-&idle_thread[0]],
                   CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE)
 {
     CYG_REPORT_FUNCTION();
 
Index: kernel/current/src/debug/dbg_gdb.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/kernel/current/src/debug/dbg_gdb.cxx,v
retrieving revision 1.10
diff -u -5 -p -r1.10 dbg_gdb.cxx
--- kernel/current/src/debug/dbg_gdb.cxx	23 May 2002 23:06:53 -0000	1.10
+++ kernel/current/src/debug/dbg_gdb.cxx	2 Jul 2007 11:43:41 -0000
@@ -239,11 +239,11 @@ static char *dbg_addstr(char *s, char *t
 static char *dbg_addint(char *s, int n, int base)
 {
     char buf[16];
     char sign = '+';
     cyg_count8 bpos;
-    char *digits = "0123456789ABCDEF";
+    char *digits = (char *)"0123456789ABCDEF";
 
     if( n < 0 ) n = -n, sign = '-';
     
     /* Set pos to start */
     bpos = 0;
@@ -294,40 +294,40 @@ externC int dbg_threadinfo(
     char *sbp = statebuf;
     char *s;
 
     if( thread->get_state() & Cyg_Thread::SUSPENDED )
     {
-        sbp = dbg_addstr( sbp, "suspended+");
+        sbp = dbg_addstr( sbp, (char *)"suspended+");
     }
 
     switch( thread->get_state() & ~Cyg_Thread::SUSPENDED )
     {
     case Cyg_Thread::RUNNING:
         if ( Cyg_Scheduler::get_current_thread() == thread ) {
-            s = "running";              break;
+            s = (char *)"running";              break;
         }
         else if ( thread->get_state() & Cyg_Thread::SUSPENDED ) {
-            s = ""; sbp--; /*kill '+'*/ break;
+            s = (char *)""; sbp--; /*kill '+'*/ break;
         }
         else {
-            s = "ready";                break;
+            s = (char *)"ready";                break;
         }
     case Cyg_Thread::SLEEPING:
-        s = "sleeping";                 break;
+        s = (char *)"sleeping";                 break;
     case Cyg_Thread::COUNTSLEEP | Cyg_Thread::SLEEPING:
     case Cyg_Thread::COUNTSLEEP:
-        s = "counted sleep";            break;
+        s = (char *)"counted sleep";            break;
     case Cyg_Thread::CREATING:
-        s = "creating"; sbp = statebuf; break;
+        s = (char *)"creating"; sbp = statebuf; break;
     case Cyg_Thread::EXITED:
-        s = "exited"; sbp = statebuf;   break;
+        s = (char *)"exited"; sbp = statebuf;   break;
     default:
-        s = "unknown state";            break;
+        s = (char *)"unknown state";            break;
     }
 
     sbp = dbg_addstr( sbp, s );
-    sbp = dbg_addstr( sbp, ", Priority: " );
+    sbp = dbg_addstr( sbp, (char *)", Priority: " );
     sbp = dbg_adddec( sbp, thread->get_priority() );
     
     info->thread_display        = statebuf;
 
 #ifdef CYGVAR_KERNEL_THREADS_NAME

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]