1
0
Fork 0

Merge pull request #180 from DISTORTEC/wextra_warnings

Fix a couple of warnings which appear with -Wextra option for gcc
This commit is contained in:
Martin Wagner 2020-05-07 07:13:55 +02:00 committed by GitHub
commit a773713d91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -811,6 +811,8 @@ static CO_LSSmaster_return_t CO_LSSmaster_FsScanInitiate(
CO_LSSmaster_scantype_t scan, CO_LSSmaster_scantype_t scan,
CO_LSS_fastscan_lss_sub_next lssSub) CO_LSS_fastscan_lss_sub_next lssSub)
{ {
(void)timeDifference_us; /* unused */
LSSmaster->fsLssSub = lssSub; LSSmaster->fsLssSub = lssSub;
LSSmaster->fsIdNumber = 0; LSSmaster->fsIdNumber = 0;
@ -900,6 +902,8 @@ static CO_LSSmaster_return_t CO_LSSmaster_FsVerifyInitiate(
uint32_t idNumberCheck, uint32_t idNumberCheck,
CO_LSS_fastscan_lss_sub_next lssNext) CO_LSS_fastscan_lss_sub_next lssNext)
{ {
(void)timeDifference_us; /* unused */
switch (scan) { switch (scan) {
case CO_LSSmaster_FS_SCAN: case CO_LSSmaster_FS_SCAN:
/* ID obtained by scan */ /* ID obtained by scan */

View file

@ -38,6 +38,8 @@ static void CO_LSSslave_serviceSwitchStateGlobal(
CO_LSS_cs_t service, CO_LSS_cs_t service,
void *msg) void *msg)
{ {
(void)service; /* unused */
uint8_t *data = CO_CANrxMsg_readData(msg); uint8_t *data = CO_CANrxMsg_readData(msg);
uint8_t mode = data[1]; uint8_t mode = data[1];
@ -224,6 +226,8 @@ static void CO_LSSslave_serviceInquire(
CO_LSS_cs_t service, CO_LSS_cs_t service,
void *msg) void *msg)
{ {
(void)msg; /* unused */
uint32_t value; uint32_t value;
if(LSSslave->lssState != CO_LSS_STATE_CONFIGURATION) { if(LSSslave->lssState != CO_LSS_STATE_CONFIGURATION) {
@ -485,6 +489,8 @@ void CO_LSSslave_process(
uint16_t *pendingBitRate, uint16_t *pendingBitRate,
uint8_t *pendingNodeId) uint8_t *pendingNodeId)
{ {
(void)activeBitRate; /* unused */
LSSslave->activeNodeID = activeNodeId; LSSslave->activeNodeID = activeNodeId;
*pendingBitRate = LSSslave->pendingBitRate; *pendingBitRate = LSSslave->pendingBitRate;
*pendingNodeId = LSSslave->pendingNodeID; *pendingNodeId = LSSslave->pendingNodeID;

View file

@ -131,7 +131,7 @@ static CO_ReturnError_t disableRx(CO_CANmodule_t *CANmodule)
static CO_ReturnError_t setRxFilters(CO_CANmodule_t *CANmodule) static CO_ReturnError_t setRxFilters(CO_CANmodule_t *CANmodule)
{ {
int ret; int ret;
int i; size_t i;
int count; int count;
CO_ReturnError_t retval; CO_ReturnError_t retval;