瀏覽代碼

More coverity fixes

Erik van der Zalm 11 年之前
父節點
當前提交
cfb98ef682
共有 3 個檔案被更改,包括 4 行新增1 行删除
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 1
    0
      Marlin/temperature.cpp
  3. 2
    0
      README.md

+ 1
- 1
Marlin/Marlin_main.cpp 查看文件

@@ -2468,7 +2468,7 @@ void process_commands()
2468 2468
 
2469 2469
         if(pin_state >= -1 && pin_state <= 1){
2470 2470
 
2471
-          for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
2471
+          for(int8_t i = 0; i < (int8_t)(sizeof(sensitive_pins)/sizeof(int)); i++)
2472 2472
           {
2473 2473
             if (sensitive_pins[i] == pin_number)
2474 2474
             {

+ 1
- 0
Marlin/temperature.cpp 查看文件

@@ -609,6 +609,7 @@ static float analog2temp(int raw, uint8_t e) {
609 609
       SERIAL_ERROR((int)e);
610 610
       SERIAL_ERRORLNPGM(" - Invalid extruder number !");
611 611
       kill();
612
+      return 0.0;
612 613
   } 
613 614
   #ifdef HEATER_0_USES_MAX6675
614 615
     if (e == 0)

+ 2
- 0
README.md 查看文件

@@ -1,6 +1,8 @@
1 1
 ==========================
2 2
 Marlin 3D Printer Firmware
3 3
 ==========================
4
+[![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224)
5
+
4 6
 Marlin has a GPL license because I believe in open development.
5 7
 Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.
6 8
 

Loading…
取消
儲存