Skip to content

Fix Compiler Warnings introduced by ESP32-C6 Support #437

Closed
@bjoernQ

Description

@bjoernQ

When not compiling for ESP32-C6:

warning: variant `RtcCalInternalOsc` is never constructed
   --> C:\projects\esp\esp-hal\esp-hal-common\src\rtc_cntl\mod.rs:116:5
    |
107 | pub(crate) enum RtcCalSel {
    |                 --------- variant in this enum
...
116 |     RtcCalInternalOsc = 3,
    |     ^^^^^^^^^^^^^^^^^
    |
    = note: `RtcCalSel` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default

When compiling for ESP32-C6:

warning: associated function `enable_8m` is never used
   --> C:\projects\esp\esp-hal\esp-hal-common\src\rtc_cntl\rtc\esp32c6.rs:279:8
    |
279 |     fn enable_8m(clk_8m_en: bool, _d256_en: bool) {
    |        ^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: associated function `get_calibration_value` is never used
   --> C:\projects\esp\esp-hal\esp-hal-common\src\rtc_cntl\rtc\esp32c6.rs:629:8
    |
629 |     fn get_calibration_value(cal_clk: RtcCalSel, slowclk_cycles: u32) -> u32 {
    |        ^^^^^^^^^^^^^^^^^^^^^

   Compiling esp-hal-smartled v0.1.0 (C:\projects\esp\esp-hal\esp-hal-smartled)
warning: `esp-hal-common` (lib) generated 2 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 29.11s

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions