lint: fix unusedVariable warnings

SQUASH ME: into unusedVariable (annotated)

SQUASH ME: into unusedVariable (II)

SQUASH ME: into unreadVariable (II)
dev/timer
Hinnerk van Bruinehsen 9 years ago
parent 2103249815
commit ec98c85a05

@ -119,6 +119,8 @@ void cc110x_write_reg(uint8_t addr, uint8_t value)
while (!(RFDINIFG & RF1AIFCTL1));
/* cppcheck: need to force a read to RF1ADOUTB to trigger reset */
/* cppcheck-suppress unreadVariable */
i = RF1ADOUTB; /* Reset RFDOUTIFG flag which contains status byte */
restoreIRQ(int_state);
@ -213,6 +215,8 @@ uint8_t cc110x_writeburst_reg(uint8_t addr, char *buffer, uint8_t count)
while (!(RFDINIFG & RF1AIFCTL1)); /* Wait for TX to finish */
}
/* cppcheck: need to force a read to RF1ADOUTB to trigger reset */
/* cppcheck-suppress unreadVariable */
i = RF1ADOUTB; /* Reset RFDOUTIFG flag which contains status byte */
restoreIRQ(int_state);

@ -190,7 +190,7 @@ void (* const g_pfnVectors[])(void) =
*******************************************************************************/
void Reset_Handler(void)
{
unsigned long *pulSrc, *pulDest;
unsigned long *pulDest;
/*
* This used for cleaning AHBRAM0 section
@ -218,7 +218,7 @@ void Reset_Handler(void)
* Copy the data segment initializers from flash to SRAM in ROM mode
*/
#if (__RAM_MODE__==0)
pulSrc = &__sidata;
unsigned long *pulSrc = &__sidata;
for(pulDest = &__data_start__; pulDest < &__data_end__; )
{
*(pulDest++) = *(pulSrc++);

@ -523,15 +523,24 @@ static int twofish_set_key(twofish_context_t *ctx, uint8_t *key, uint8_t keylen)
int i, j, k;
/* Temporaries for CALC_K. */
/* cppcheck: used in macros in sys/include/crypto/twofish.h that cppcheck
* doesn't understand
*/
/* cppcheck-suppress unusedVariable */
uint32_t x, y;
/* The S vector used to key the S-boxes, split up into individual bytes.
* 128-bit keys use only sa through sh; 256-bit use all of them. */
uint8_t sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
/* cppcheck: moving this may introduce timing vulnerability */
/* cppcheck-suppress variableScope */
uint8_t si = 0, sj = 0, sk = 0, sl = 0, sm = 0, sn = 0, so = 0, sp = 0;
/* Temporary for CALC_S. */
/* cppcheck: used in macros in sys/include/crypto/twofish.h that cppcheck
* doesn't understand
*/
/* cppcheck-suppress unusedVariable */
uint8_t tmp;
/* Check key length. */
@ -674,6 +683,10 @@ int twofish_encrypt(cipher_context_t *context, uint8_t *in, uint8_t *out)
uint32_t a, b, c, d;
/* Temporaries used by the round function. */
/* cppcheck: used in macros in sys/include/crypto/twofish.h that cppcheck
* doesn't understand
*/
/* cppcheck-suppress unusedVariable */
uint32_t x, y;
/* Input whitening and packing. */
@ -727,6 +740,10 @@ int twofish_decrypt(cipher_context_t *context, uint8_t *in, uint8_t *out)
uint32_t a, b, c, d;
/* Temporaries used by the round function. */
/* cppcheck: used in macros in sys/include/crypto/twofish.h that cppcheck
* doesn't understand
*/
/* cppcheck-suppress unusedVariable */
uint32_t x, y;
/* Input whitening and packing. */

Loading…
Cancel
Save