[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.0.4-testing] More 'const' cleanups (and fixes, for Solaris).
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |