Skip to content

Commit a225baf

Browse files
committed
RNG - fix warnings due to obj not used for some targets
1 parent e8ca16d commit a225baf

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K66F/rng_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@
3030

3131
void rng_init(rng_t *obj)
3232
{
33+
(void)obj;
3334
CLOCK_EnableClock(kCLOCK_Rnga0);
3435
CLOCK_DisableClock(kCLOCK_Rnga0);
3536
CLOCK_EnableClock(kCLOCK_Rnga0);
3637
}
3738

3839
void rng_free(rng_t *obj)
3940
{
41+
(void)obj;
4042
CLOCK_DisableClock(kCLOCK_Rnga0);
4143
}
4244

@@ -58,6 +60,7 @@ static void rng_get_byte(unsigned char *byte)
5860

5961
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
6062
{
63+
(void)obj;
6164
size_t i;
6265
int ret;
6366

hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_MCU_K64F/rng_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@
3030

3131
void rng_init(rng_t *obj)
3232
{
33+
(void)obj;
3334
CLOCK_EnableClock(kCLOCK_Rnga0);
3435
CLOCK_DisableClock(kCLOCK_Rnga0);
3536
CLOCK_EnableClock(kCLOCK_Rnga0);
3637
}
3738

3839
void rng_free(rng_t *obj)
3940
{
41+
(void)obj;
4042
CLOCK_DisableClock(kCLOCK_Rnga0);
4143
}
4244

@@ -58,6 +60,7 @@ static void rng_get_byte(unsigned char *byte)
5860

5961
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
6062
{
63+
(void)obj;
6164
size_t i;
6265
int ret;
6366

hal/targets/hal/TARGET_NUVOTON/TARGET_NUC472/rng_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ static void rng_get(unsigned char *pConversionData)
5858

5959
void rng_init(rng_t *obj)
6060
{
61+
(void)obj;
6162
/* Unlock protected registers */
6263
SYS_UnlockReg();
6364
/* Enable IP clock */
@@ -72,13 +73,16 @@ void rng_init(rng_t *obj)
7273

7374
void rng_free(rng_t *obj)
7475
{
76+
(void)obj;
7577
PRNG_DISABLE_INT();
7678
NVIC_DisableIRQ(CRPT_IRQn);
7779
//CLK_DisableModuleClock(CRPT_MODULE);
7880
}
7981

8082
int rng_get_bytes(rng_t *obj, uint8_t *output, size_t length, size_t *output_length)
8183
{
84+
(void)obj;
85+
8286
*output_length = 0;
8387
if (length < 32) {
8488
unsigned char tmpBuff[32];

0 commit comments

Comments
 (0)