Skip to content

Commit

Permalink
Update modbus-data.c
Browse files Browse the repository at this point in the history
Making all in src
  CC       modbus.lo
  CC       modbus-data.lo
modbus-data.c:51:5: attention : #warning "Fallback on C functions for bswap_16" [-Wcpp]
 #   warning "Fallback on C functions for bswap_16"
     ^
modbus-data.c:52:24: erreur: redefinition of ‘bswap_16’
 static inline uint16_t bswap_16(uint16_t x)
  • Loading branch information
StalderT authored and stephane committed May 20, 2016
1 parent 8f25229 commit cb4d3ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modbus-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
# define bswap_16 _byteswap_ushort
#endif

#if !defined(__CYGWIN__)
#if !defined(bswap_16)
# warning "Fallback on C functions for bswap_16"
static inline uint16_t bswap_16(uint16_t x)
{
return (x >> 8) | (x << 8);
}
#endif
#endif

#if !defined(bswap_32)
# warning "Fallback on C functions for bswap_32"
Expand Down

0 comments on commit cb4d3ea

Please sign in to comment.