Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/string Add explicit casts to make lint happy and fi...
details: https://anonhg.NetBSD.org/src/rev/5c70977e9a74
branches: trunk
changeset: 771564:5c70977e9a74
user: tron <tron%NetBSD.org@localhost>
date: Fri Nov 25 09:00:51 2011 +0000
description:
Add explicit casts to make lint happy and fix the NetBSD/i386 build.
diffstat:
lib/libc/string/wcscspn_bloom.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 91584f4b2e0f -r 5c70977e9a74 lib/libc/string/wcscspn_bloom.h
--- a/lib/libc/string/wcscspn_bloom.h Fri Nov 25 07:50:36 2011 +0000
+++ b/lib/libc/string/wcscspn_bloom.h Fri Nov 25 09:00:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wcscspn_bloom.h,v 1.1 2011/11/24 18:44:25 joerg Exp $ */
+/* $NetBSD: wcscspn_bloom.h,v 1.2 2011/11/25 09:00:51 tron Exp $ */
/*-
* Copyright (c) 2011 Joerg Sonnenberger,
@@ -50,8 +50,8 @@
static inline size_t
wcscspn_bloom2(size_t x)
{
- return (uint32_t)(x * 2654435761U) /
- (0x100000000ULL / (BLOOM_MASK + 1));
+ return (size_t)((uint32_t)(x * 2654435761U) /
+ (0x100000000ULL / (BLOOM_MASK + 1)));
}
static inline void
@@ -62,9 +62,9 @@
memset(bloom, 0, BLOOM_SIZE);
do {
val = wcscspn_bloom1((size_t)*charset);
- bloom[val / BLOOM_DIV] |= 1ULL << (val % BLOOM_DIV);
+ bloom[val / BLOOM_DIV] |= (size_t)(1ULL << (val % BLOOM_DIV));
val = wcscspn_bloom2((size_t)*charset);
- bloom[val / BLOOM_DIV] |= 1ULL << (val % BLOOM_DIV);
+ bloom[val / BLOOM_DIV] |= (size_t)(1ULL << (val % BLOOM_DIV));
}
while (*++charset);
}
Home |
Main Index |
Thread Index |
Old Index