[PATCH] Fix Wundef warning for MEMCPY_OK_FOR_FWD_MEMMOVE

Siddhesh Poyarekar siddhesh@redhat.com
Thu Jun 26 18:52:00 GMT 2014


Define MEMCPY_OK_FOR_FWD_MEMMOVE to 0 in x86_64 memmove.c before
including the generic string/memmove.c to get rid of this warning.

Tested to verify on x86_64 that the generated code is identical.

Siddhesh

	* sysdeps/x86_64/memmove.c: Define MEMCPY_OK_FOR_FWD_MEMMOVE
	to 0.
	* sysdeps/x86_64/multiarch/memmove.c: Likewise.

---
 sysdeps/x86_64/memmove.c           | 1 +
 sysdeps/x86_64/multiarch/memmove.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sysdeps/x86_64/memmove.c b/sysdeps/x86_64/memmove.c
index 202f5b8..9013c105 100644
--- a/sysdeps/x86_64/memmove.c
+++ b/sysdeps/x86_64/memmove.c
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define MEMCPY_OK_FOR_FWD_MEMMOVE 0
 #include "string/memmove.c"
 
 #if !defined memmove && !defined NOT_IN_libc
diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c
index ba86e7b..5477be1 100644
--- a/sysdeps/x86_64/multiarch/memmove.c
+++ b/sysdeps/x86_64/multiarch/memmove.c
@@ -37,6 +37,7 @@ extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden;
 extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden;
 #endif
 
+#define MEMCPY_OK_FOR_FWD_MEMMOVE 0
 #include "string/memmove.c"
 
 #ifndef NOT_IN_libc
-- 
1.9.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140626/fd4406b2/attachment.sig>


More information about the Libc-alpha mailing list