From d303b5967b4351af84e6b7faf46970b5c539ec01 Mon Sep 17 00:00:00 2001 From: Tero Kontkanen Date: Thu, 23 Feb 2017 01:05:32 +0200 Subject: Got rid of various compiler warnings --- busdevice.h | 2 +- simplemotion.c | 6 +++--- simplemotion.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/busdevice.h b/busdevice.h index 580cda8..6a02a26 100644 --- a/busdevice.h +++ b/busdevice.h @@ -7,7 +7,7 @@ #include "simplemotion.h" #include "simplemotion_private.h" -typedef smint8 smbusdevicehandle; +typedef smint16 smbusdevicehandle; #define SM_BAUDRATE 460800 diff --git a/simplemotion.c b/simplemotion.c index 78059ab..4ef9b00 100644 --- a/simplemotion.c +++ b/simplemotion.c @@ -308,7 +308,6 @@ smbool smTransmitBuffer( const smbus handle ) SM_STATUS smSendSMCMD( smbus handle, smuint8 cmdid, smuint8 addr, smuint8 datalen, smuint8 *cmddata ) { int i; - smuint8 data; smuint16 sendcrc; //check if bus handle is valid & opened @@ -431,7 +430,6 @@ SM_STATUS smReceiveErrorHandler( smbus handle, smbool flushrx ) SM_STATUS smAppendSMCommandToQueue( smbus handle, int smpCmdType,smint32 paramvalue ) { - smuint8 txbyte; int cmdlength; //check if bus handle is valid & opened @@ -951,10 +949,12 @@ SM_STATUS getCumulativeStatus( const smbus handle ) } /** Reset cululative status so getCumultiveStatus returns 0 after calling this until one of the other functions are called*/ -void resetCumulativeStatus( const smbus handle ) +SM_STATUS resetCumulativeStatus( const smbus handle ) { if(smIsHandleOpen(handle)==smfalse) return SM_ERR_NODEVICE; smBus[handle].cumulativeSmStatus=0; + + return SM_OK; } diff --git a/simplemotion.h b/simplemotion.h index 965512f..725d3dc 100644 --- a/simplemotion.h +++ b/simplemotion.h @@ -112,7 +112,7 @@ LIB void smSetDebugOutput( smVerbosityLevel level, FILE *stream ); /** This function returns all occurred SM_STATUS bits after smOpenBus or resetCumulativeStatus call*/ LIB SM_STATUS getCumulativeStatus( const smbus handle ); /** Reset cululative status so getCumultiveStatus returns 0 after calling this until one of the other functions are called*/ -LIB void resetCumulativeStatus( const smbus handle ); +LIB SM_STATUS resetCumulativeStatus( const smbus handle ); /** SMV2 Device communication functionss */ -- cgit v1.2.3