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-3.0.4-testing] More 'const' cleanups (and fixes, fo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.4-testing] More 'const' cleanups (and fixes, for Solaris).
From: "Xen patchbot-3.0.4-testing" <patchbot-3.0.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Jan 2007 14:15:41 -0800
Delivery-date: Wed, 03 Jan 2007 14:16:20 -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 550f95a4a051efe5d8048d15262310f091343989
# Parent  2d64d977c3f2a94e57a7ad2a8295f24faa6c5260
More 'const' cleanups (and fixes, for Solaris).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

Based on xen-unstable changeset 13136:36e33da5146bef9109723bb96a356d1fca14496e
---
 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 2d64d977c3f2 -r 550f95a4a051 tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Fri Dec 22 11:58:22 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 2d64d977c3f2 -r 550f95a4a051 xen/common/gdbstub.c
--- a/xen/common/gdbstub.c      Fri Dec 22 11:58:22 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 2d64d977c3f2 -r 550f95a4a051 xen/include/asm-x86/bitops.h
--- a/xen/include/asm-x86/bitops.h      Fri Dec 22 11:58:22 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-3.0.4-testing] More 'const' cleanups (and fixes, for Solaris)., Xen patchbot-3.0.4-testing <=