From 260d52898737bc52e602a56f694931fc9e5c8fa2 Mon Sep 17 00:00:00 2001 From: Tero Kontkanen Date: Thu, 23 Feb 2017 01:40:58 +0200 Subject: Fix rest of the compiler warnings --- pcserialport.c | 1 + simplemotion.c | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pcserialport.c b/pcserialport.c index ef33aa9..2b44add 100644 --- a/pcserialport.c +++ b/pcserialport.c @@ -23,6 +23,7 @@ #include #include #include +#include smint32 serialPortOpen(const char * port_device_name, smint32 baudrate_bps) { diff --git a/simplemotion.c b/simplemotion.c index 4ef9b00..9a0b3fb 100644 --- a/simplemotion.c +++ b/simplemotion.c @@ -1,3 +1,4 @@ + //Copyright (c) Granite Devices Oy #include @@ -463,12 +464,6 @@ SM_STATUS smAppendSMCommandToQueue( smbus handle, int smpCmdType,smint32 paramva SMPayloadCommand16 newcmd; newcmd.ID=SMPCMD_SETPARAMADDR; newcmd.param=paramvalue; - - // bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes, 5); - // bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes, 6); - /* -FIXME - ei toimi, menee vaa nollaa*/ bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes++, ((unsigned char*)&newcmd)[1]); bufput8bit( smBus[handle].recv_rsbuf, smBus[handle].cmd_send_queue_bytes++, ((unsigned char*)&newcmd)[0]); } @@ -866,7 +861,7 @@ SM_STATUS smGetBufferClock( const smbus handle, const smaddr targetaddr, smuint1 if(stat!=SM_OK) return recordStatus(handle,stat); //maybe timeouted if(clock!=NULL) - *clock=bufget16bit(smBus[handle].recv_rsbuf,0); + memcpy(clock,smBus[handle].recv_rsbuf,sizeof(smuint16)); smBus[handle].recv_storepos=0; -- cgit v1.2.3