about summary refs log tree commit diff
path: root/sysdeps/x86/bits
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2016-06-28 12:54:59 +0200
committerAndreas Schwab <schwab@suse.de>2016-06-29 17:15:40 +0200
commitfea56491c44623b23675b4440bf4037b855b5ce0 (patch)
tree43fe2f3f2d48d322d34634942cc32cdda9178d34 /sysdeps/x86/bits
parente402823ef3852704296cd775c58e4bc633c07f20 (diff)
downloadglibc-fea56491c44623b23675b4440bf4037b855b5ce0.tar.gz
glibc-fea56491c44623b23675b4440bf4037b855b5ce0.tar.xz
glibc-fea56491c44623b23675b4440bf4037b855b5ce0.zip
Avoid array-bounds warning for strncat on i586 (bug 20260)
Diffstat (limited to 'sysdeps/x86/bits')
-rw-r--r--sysdeps/x86/bits/string.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
index 8dfce052a6..805d33f0a2 100644
--- a/sysdeps/x86/bits/string.h
+++ b/sysdeps/x86/bits/string.h
@@ -1089,7 +1089,6 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
      :  "g" (__n), "0" (0), "1" (__tmp), "2" (__src), "3" (0xffffffff)
      : "memory", "cc");
 # else
-  --__tmp;
   __asm__ __volatile__
     ("1:\n\t"
      "cmpb	$0,1(%1)\n\t"
@@ -1108,7 +1107,7 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
      "3:\n\t"
      "movb	$0,(%1)"
      : "=&q" (__dummy), "=&r" (__tmp), "=&r" (__src), "=&r" (__n)
-     : "1" (__tmp), "2" (__src), "3" (__n)
+     : "1" ((unsigned long) __tmp - 1), "2" (__src), "3" (__n)
      : "memory", "cc");
 #endif
   return __dest;