Avoided warning concerning EC_READ/WRITE() macros on some compilers.
authorFlorian Pose <fp@igh-essen.com>
Thu, 21 Feb 2008 15:54:10 +0000
changeset 810 7d7c59e1427e
parent 809 ec4ef8911824
child 811 741cabf0fff6
Avoided warning concerning EC_READ/WRITE() macros on some compilers.
include/ecrt.h
--- a/include/ecrt.h	Thu Feb 21 15:49:02 2008 +0000
+++ b/include/ecrt.h	Thu Feb 21 15:54:10 2008 +0000
@@ -648,7 +648,7 @@
 #define EC_WRITE_U16(DATA, VAL) \
     do { \
         *((uint16_t *) (DATA)) = (uint16_t) (VAL); \
-        cpu_to_le16s(DATA); \
+        cpu_to_le16s((uint16_t *) (DATA)); \
     } while (0)
 
 /** Write a 16-bit signed value to EtherCAT data.
@@ -664,7 +664,7 @@
 #define EC_WRITE_U32(DATA, VAL) \
     do { \
         *((uint32_t *) (DATA)) = (uint32_t) (VAL); \
-        cpu_to_le32s(DATA); \
+        cpu_to_le32s((uint32_t *) (DATA)); \
     } while (0)
 
 /** Write a 32-bit signed value to EtherCAT data.