Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings found with "--warnings more" #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Noltari
Copy link

@Noltari Noltari commented May 31, 2023

Fix warnings found with "--warnings more":

/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp: In member function 'void ELECHOUSE_CC1101::Reset()':
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp:149:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
   while(digitalRead(MISO_PIN));
   ^~~~~
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp:150:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
  digitalWrite(SS_PIN, HIGH);
  ^~~~~~~~~~~~
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp: In member function 'void ELECHOUSE_CC1101::Split_MDMCFG1()':
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp:983:5: error: unused variable 's2' [-Werror=unused-variable]
 int s2 = 0;
     ^~
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp: In member function 'void ELECHOUSE_CC1101::setPA(int)':
/home/runner/Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp:445:5: error: 'a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 int a;
     ^
cc1plus: some warnings being treated as errors

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
@Legion2
Copy link

Legion2 commented Sep 2, 2023

These warnings are treated as errors in my CI arduino builds (I'm not sure why and where this is configured) and now my tests fail on my main branch https://github.com/Legion2/Somfy_Remote_Lib/actions/runs/6057348260/job/16439196101?pr=31#step:3:508

@Noltari Noltari mentioned this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants