* [PATCH v1 1/1] lib/string: add ULL suffix to the constant definition
@ 2015-11-10 12:23 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2015-11-10 12:23 UTC (permalink / raw)
To: Rasmus Villemoes, Andrew Morton, linux-kernel; +Cc: Andy Shevchenko
8-byte constant is too big for long and compiler complains about this.
lib/string.c:907:20: warning: constant 0x0101010101010101 is so big it is long
Append ULL suffix to explicitly show its type.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
lib/string.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/string.c b/lib/string.c
index 5e4bb86..dd02270 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -930,7 +930,7 @@ void *memchr_inv(const void *start, int c, size_t bytes)
value64 = value;
#if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64
- value64 *= 0x0101010101010101;
+ value64 *= 0x0101010101010101ULL;
#elif defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER)
value64 *= 0x01010101;
value64 |= value64 << 32;
--
2.6.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-10 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10 12:23 [PATCH v1 1/1] lib/string: add ULL suffix to the constant definition Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®