iio: adc: talise: Fix unused variable warnings#318
Conversation
| TAL_ERR_GETFHMSTS_NULL_PARAM, retVal, TALACT_ERR_CHECK_PARAM); | ||
| } | ||
|
|
||
| #if TALISE_VERBOSE |
There was a problem hiding this comment.
i'm not sure moving this higher is semantically correct;
technically, fhmStatus == NULL can happen and then the talWriteToLog() would write error TAL_ERR_OK
one idea to fix this lower is to add brackets to introduce a new scope ;
so, technically somethhing like this
#if TALISE_VERBOSE
{
adiHalErr_t halError = ADIHAL_OK;
halError = talWriteToLog(device->devHalInfo, ADIHAL_LOG_MSG, TAL_ERR_OK, "TALISE_getFhmStatus()\n");
retVal = talApiErrHandler(device, TAL_ERRHDL_HAL_LOG, halError, retVal, TALACT_WARN_RESET_LOG);
}
#endif
There was a problem hiding this comment.
hmm; i take back what i said;
this should be fine; given that other places do the same thing
sorry for the noise
| { | ||
| dataToWrite |= ((enableMask & ((uint8_t)TAL_DC_OFFSET_ORX1 | (uint8_t)TAL_DC_OFFSET_ORX2)) >> 2); | ||
| } | ||
There was a problem hiding this comment.
nitpick: some whitespace changes are mixed into this patch
There was a problem hiding this comment.
Sorry for that. My editor is automatically removing the whitespace in these cases. I've pushed the updated commit.
|
just some minor comments; |
mhennerich
left a comment
There was a problem hiding this comment.
The API driver is not something we maintain here. We should fix this also wherever this code is maintained.
warning: unused variable ‘halError’ [-Wunused-variable]
adiHalErr_t halError = ADIHAL_OK;
^~~~~~~~
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
b914464 to
1fbeca5
Compare
warning: unused variable ‘halError’ [-Wunused-variable]
adiHalErr_t halError = ADIHAL_OK;
^~~~~~~~
Signed-off-by: Dragos Bogdan dragos.bogdan@analog.com