WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] More 'const' cleanups (and fixes, for Solaris).
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Dec 2006 15:10:07 -0800
Delivery-date: Sat, 23 Dec 2006 15:10:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] More 'const' cleanups (and fixes, for Solaris)., Xen patchbot-unstable <=