aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>2025-01-06 19:17:28 +0100
committerStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>2025-01-06 19:17:28 +0100
commit7a7903dec533e02c58e634b6ddd680f36c4cd933 (patch)
tree289cd5ba05cbc7e2fef7d0cfe68c7156a79d6eee
parentf0b8256224ec082ecffddcb5624a4b5032c09113 (diff)
downloadgcc-7a7903dec533e02c58e634b6ddd680f36c4cd933.zip
gcc-7a7903dec533e02c58e634b6ddd680f36c4cd933.tar.gz
gcc-7a7903dec533e02c58e634b6ddd680f36c4cd933.tar.bz2
Fix type in some Min() calls (#119248)
This is a follow-up to 6dec33834d1fd89f16e271dde9607c1de9554144 and pull requests #116957 and #119114. Cherry picked from LLVM commit 65a2eb0b1589590ae78cc1e5f05cd004b3b3bec5. libsanitizer/ChangeLog: PR sanitizer/117725 * sanitizer_common/sanitizer_common_interceptors.inc: Cherry picked from LLVM commit 65a2eb0b1589590ae78cc1e5f05cd004b3b3bec5.
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
index b0adcf1..f2a9348 100644
--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
@@ -520,14 +520,14 @@ INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, strncmp, s1, s2, size);
unsigned char c1 = 0, c2 = 0;
- uptr i;
+ usize i;
for (i = 0; i < size; i++) {
c1 = (unsigned char)s1[i];
c2 = (unsigned char)s2[i];
if (c1 != c2 || c1 == '\0') break;
}
- uptr i1 = i;
- uptr i2 = i;
+ usize i1 = i;
+ usize i2 = i;
if (common_flags()->strict_string_checks) {
for (; i1 < size && s1[i1]; i1++) {}
for (; i2 < size && s2[i2]; i2++) {}
@@ -583,14 +583,14 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, strncasecmp, s1, s2, size);
unsigned char c1 = 0, c2 = 0;
- uptr i;
+ usize i;
for (i = 0; i < size; i++) {
c1 = (unsigned char)s1[i];
c2 = (unsigned char)s2[i];
if (CharCaseCmp(c1, c2) != 0 || c1 == '\0') break;
}
- uptr i1 = i;
- uptr i2 = i;
+ usize i1 = i;
+ usize i2 = i;
if (common_flags()->strict_string_checks) {
for (; i1 < size && s1[i1]; i1++) {}
for (; i2 < size && s2[i2]; i2++) {}
@@ -851,7 +851,7 @@ int MemcmpInterceptorCommon(void *ctx,
unsigned char c1 = 0, c2 = 0;
const unsigned char *s1 = (const unsigned char*)a1;
const unsigned char *s2 = (const unsigned char*)a2;
- uptr i;
+ usize i;
for (i = 0; i < size; i++) {
c1 = s1[i];
c2 = s2[i];