ia64/xen-unstable

changeset 13172:36e33da5146b

More 'const' cleanups (and fixes, for Solaris).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Dec 23 09:38:07 2006 +0000 (2006-12-23)
parents 132559289b46
children bbd1c469ff5b
files tools/xenstat/xentop/xentop.c xen/common/gdbstub.c xen/include/asm-x86/bitops.h
line diff
     1.1 --- a/tools/xenstat/xentop/xentop.c	Fri Dec 22 22:57:47 2006 +0000
     1.2 +++ b/tools/xenstat/xentop/xentop.c	Sat Dec 23 09:38:07 2006 +0000
     1.3 @@ -269,7 +269,7 @@ static void print(const char *fmt, ...)
     1.4  	if (!batch) {
     1.5  		if((current_row() < lines()-1)) {
     1.6  			va_start(args, fmt);
     1.7 -			vwprintw(stdscr, (const char *)fmt, args);
     1.8 +			vwprintw(stdscr, fmt, args);
     1.9  			va_end(args);
    1.10  		}
    1.11  	} else {
    1.12 @@ -283,7 +283,7 @@ static void print(const char *fmt, ...)
    1.13  static void attr_addstr(int attr, const char *str)
    1.14  {
    1.15  	attron(attr);
    1.16 -	addstr((const char *)str);
    1.17 +	addstr(str);
    1.18  	attroff(attr);
    1.19  }
    1.20  
     2.1 --- a/xen/common/gdbstub.c	Fri Dec 22 22:57:47 2006 +0000
     2.2 +++ b/xen/common/gdbstub.c	Sat Dec 23 09:38:07 2006 +0000
     2.3 @@ -382,7 +382,7 @@ gdbstub_detach(struct gdb_context *ctx)
     2.4  static int 
     2.5  process_command(struct cpu_user_regs *regs, struct gdb_context *ctx)
     2.6  {
     2.7 -    char *ptr;
     2.8 +    const char *ptr;
     2.9      unsigned long addr, length;
    2.10      int resume = 0;
    2.11  
     3.1 --- a/xen/include/asm-x86/bitops.h	Fri Dec 22 22:57:47 2006 +0000
     3.2 +++ b/xen/include/asm-x86/bitops.h	Sat Dec 23 09:38:07 2006 +0000
     3.3 @@ -23,6 +23,7 @@
     3.4   */
     3.5  
     3.6  #define ADDR (*(volatile long *) addr)
     3.7 +#define CONST_ADDR (*(const volatile long *) addr)
     3.8  
     3.9  /**
    3.10   * set_bit - Atomically set a bit in memory
    3.11 @@ -253,7 +254,7 @@ static __inline__ int variable_test_bit(
    3.12  	__asm__ __volatile__(
    3.13  		"btl %2,%1\n\tsbbl %0,%0"
    3.14  		:"=r" (oldbit)
    3.15 -		:"m" (ADDR),"dIr" (nr));
    3.16 +		:"m" (CONST_ADDR),"dIr" (nr));
    3.17  	return oldbit;
    3.18  }
    3.19