Skip to content

Commit

Permalink
drivers: clock_control: nrf: fix unused variable warning
Browse files Browse the repository at this point in the history
prev_temperature was only used if USE_TEMP_SENSOR is true. Make its
definition conditional.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull authored and stephanosio committed Aug 31, 2022
1 parent 5b3f800 commit fe561f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clock_control/nrf_clock_calibration.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ LOG_MODULE_DECLARE(clock_control, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
*/

static atomic_t cal_process_in_progress;
static int16_t prev_temperature; /* Previous temperature measurement. */
static uint8_t calib_skip_cnt; /* Counting down skipped calibrations. */
static volatile int total_cnt; /* Total number of calibrations. */
static volatile int total_skips_cnt; /* Total number of skipped calibrations. */
Expand Down Expand Up @@ -62,6 +61,7 @@ static const struct device *const temp_sensor =

static void measure_temperature(struct k_work *work);
static K_WORK_DEFINE(temp_measure_work, measure_temperature);
static int16_t prev_temperature; /* Previous temperature measurement. */
#endif /* USE_TEMP_SENSOR */

static void timeout_handler(struct k_timer *timer);
Expand Down

0 comments on commit fe561f0

Please sign in to comment.