Skip to content

Commit

Permalink
gcc warnings (#172)
Browse files Browse the repository at this point in the history
Co-authored-by: Aron Svastits <svastits1@gmail.com>
  • Loading branch information
Svastits and Aron Svastits authored Jul 9, 2024
1 parent c93978b commit c85a25d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions kuka_sunrise_fri_driver/include/fri_client_sdk/friException.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class FRIException
strncpy(_buffer, message, sizeof(_buffer) - 1);
_buffer[sizeof(_buffer) - 1] = 0; // ensure string termination
printf("FRIException: ");
printf(_buffer);
printf("%s", _buffer);
printf("\n");
}

Expand All @@ -107,7 +107,7 @@ class FRIException
#endif
_buffer, sizeof(_buffer), message, param1);
printf("FRIException: ");
printf(_buffer);
printf("%s", _buffer);
printf("\n");
}

Expand All @@ -127,7 +127,7 @@ class FRIException
#endif
_buffer, sizeof(_buffer), message, param1, param2);
printf("FRIException: ");
printf(_buffer);
printf("%s", _buffer);
printf("\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class TransformationClient
*
* @return timestamp encoded as Unix time (seconds)
*/
const unsigned int getTimestampSec() const;
unsigned int getTimestampSec() const;

/**
* <br> <b>This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.</b> <br>
Expand All @@ -162,7 +162,7 @@ class TransformationClient
*
* @return timestamp encoded as Unix time (nanoseconds part)
*/
const unsigned int getTimestampNanoSec() const;
unsigned int getTimestampNanoSec() const;

/**
* <br> <b>This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.</b> <br>
Expand Down
4 changes: 2 additions & 2 deletions kuka_sunrise_fri_driver/src/fri_client_sdk/friClientData.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ struct ClientData
if (message != NULL && message->has_monitorData == true) {
const MessageMonitorData & monData = message->monitorData;
const bool analogValue = (ioType == FriIOType_ANALOG);
const bool digitalValue = (ioType == FriIOType_DIGITAL | ioType == FriIOType_BOOLEAN);
const bool digitalValue = (ioType == FriIOType_DIGITAL || ioType == FriIOType_BOOLEAN);
for (size_t i = 0; i < monData.readIORequest_count; i++) {
const FriIOValue & ioValue = monData.readIORequest[i];
if (strcmp(name, ioValue.name) == 0) {
Expand Down Expand Up @@ -221,7 +221,7 @@ struct ClientData
strncpy(ioValue.name, name, sizeof(ioValue.name) - 1);
ioValue.name[sizeof(ioValue.name) - 1] = 0; // ensure termination
ioValue.type = ioType;
ioValue.has_digitalValue = (ioType == FriIOType_DIGITAL | ioType == FriIOType_BOOLEAN);
ioValue.has_digitalValue = (ioType == FriIOType_DIGITAL || ioType == FriIOType_BOOLEAN);
ioValue.has_analogValue = (ioType == FriIOType_ANALOG);
ioValue.direction = FriIODirection_OUTPUT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ const std::vector<const char *> & TransformationClient::getRequestedTransformati
}

//******************************************************************************
const unsigned int TransformationClient::getTimestampSec() const
unsigned int TransformationClient::getTimestampSec() const
{
return _data->monitoringMsg.monitorData.timestamp.sec;
}

//******************************************************************************
const unsigned int TransformationClient::getTimestampNanoSec() const
unsigned int TransformationClient::getTimestampNanoSec() const
{
return _data->monitoringMsg.monitorData.timestamp.nanosec;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ bool encode_repeatedDouble(pb_ostream_t *stream, const pb_field_t *field, void *

bool decode_repeatedDouble(pb_istream_t *stream, const pb_field_t *field, void **arg)
{
PB_UNUSED(field);
tRepeatedDoubleArguments* arguments = 0;
size_t i = 0;
double* values = 0;
Expand Down Expand Up @@ -162,6 +163,7 @@ bool encode_repeatedInt(pb_ostream_t *stream, const pb_field_t *field, void * co

bool decode_repeatedInt(pb_istream_t *stream, const pb_field_t *field, void **arg)
{
PB_UNUSED(field);
tRepeatedIntArguments* arguments = 0;
size_t i = 0;
uint64_t* values = 0;
Expand Down

0 comments on commit c85a25d

Please sign in to comment.