Skip to content

Commit

Permalink
x86: sparse errors from string_32.h
Browse files Browse the repository at this point in the history
include/asm/string_32.h:216:26: warning: cast truncates bits from constant value (cccccccc becomes cc)
include/asm/string_32.h:219:27: warning: cast truncates bits from constant value (cccccccc becomes cccc)
include/asm/string_32.h:222:27: warning: cast truncates bits from constant value (cccccccc becomes cccc)
include/asm/string_32.h:223:30: warning: cast truncates bits from constant value (cccccccc becomes cc)

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Feb 4, 2008
1 parent 9a6b344 commit 9b42393
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/asm-x86/string_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ static __always_inline void * __constant_c_and_count_memset(void * s, unsigned l
case 0:
return s;
case 1:
*(unsigned char *)s = pattern;
*(unsigned char *)s = pattern & 0xff;
return s;
case 2:
*(unsigned short *)s = pattern;
*(unsigned short *)s = pattern & 0xffff;
return s;
case 3:
*(unsigned short *)s = pattern;
*(2+(unsigned char *)s) = pattern;
*(unsigned short *)s = pattern & 0xffff;
*(2+(unsigned char *)s) = pattern & 0xff;
return s;
case 4:
*(unsigned long *)s = pattern;
Expand Down

0 comments on commit 9b42393

Please sign in to comment.