瀏覽代碼

Merge pull request #3653 from wavexx/more_warnings

cleanup: Fix more spourious missing return warnings
Yuri D'Elia 2 年之前
父節點
當前提交
8188117c4f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Firmware/Filament_sensor.cpp

+ 3 - 1
Firmware/Filament_sensor.cpp

@@ -466,7 +466,9 @@ void PAT9125_sensor::settings_init() {
 }
 
 int16_t PAT9125_sensor::getStepCount() {
-    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { return stepCount; }
+    int16_t ret;
+    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ret = stepCount; }
+    return ret;
 }
 
 void PAT9125_sensor::resetStepCount() {