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

[Xen-changelog] [xen-unstable] More 'const' cleanups (and fixes, for Solaris).



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Date 1166866687 0
# Node ID 36e33da5146bef9109723bb96a356d1fca14496e
# Parent  132559289b46b9b0ac12b4646c30f1aae28a40e0
More 'const' cleanups (and fixes, for Solaris).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/xenstat/xentop/xentop.c |    4 ++--
 xen/common/gdbstub.c          |    2 +-
 xen/include/asm-x86/bitops.h  |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff -r 132559289b46 -r 36e33da5146b tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Fri Dec 22 22:57:47 2006 +0000
+++ b/tools/xenstat/xentop/xentop.c     Sat Dec 23 09:38:07 2006 +0000
@@ -269,7 +269,7 @@ static void print(const char *fmt, ...)
        if (!batch) {
                if((current_row() < lines()-1)) {
                        va_start(args, fmt);
-                       vwprintw(stdscr, (const char *)fmt, args);
+                       vwprintw(stdscr, fmt, args);
                        va_end(args);
                }
        } else {
@@ -283,7 +283,7 @@ static void attr_addstr(int attr, const 
 static void attr_addstr(int attr, const char *str)
 {
        attron(attr);
-       addstr((const char *)str);
+       addstr(str);
        attroff(attr);
 }
 
diff -r 132559289b46 -r 36e33da5146b xen/common/gdbstub.c
--- a/xen/common/gdbstub.c      Fri Dec 22 22:57:47 2006 +0000
+++ b/xen/common/gdbstub.c      Sat Dec 23 09:38:07 2006 +0000
@@ -382,7 +382,7 @@ static int
 static int 
 process_command(struct cpu_user_regs *regs, struct gdb_context *ctx)
 {
-    char *ptr;
+    const char *ptr;
     unsigned long addr, length;
     int resume = 0;
 
diff -r 132559289b46 -r 36e33da5146b xen/include/asm-x86/bitops.h
--- a/xen/include/asm-x86/bitops.h      Fri Dec 22 22:57:47 2006 +0000
+++ b/xen/include/asm-x86/bitops.h      Sat Dec 23 09:38:07 2006 +0000
@@ -23,6 +23,7 @@
  */
 
 #define ADDR (*(volatile long *) addr)
+#define CONST_ADDR (*(const volatile long *) addr)
 
 /**
  * set_bit - Atomically set a bit in memory
@@ -253,7 +254,7 @@ static __inline__ int variable_test_bit(
        __asm__ __volatile__(
                "btl %2,%1\n\tsbbl %0,%0"
                :"=r" (oldbit)
-               :"m" (ADDR),"dIr" (nr));
+               :"m" (CONST_ADDR),"dIr" (nr));
        return oldbit;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.