浏览代码

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
 
2468
 
2469
         if(pin_state >= -1 && pin_state <= 1){
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
             if (sensitive_pins[i] == pin_number)
2473
             if (sensitive_pins[i] == pin_number)
2474
             {
2474
             {

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

609
       SERIAL_ERROR((int)e);
609
       SERIAL_ERROR((int)e);
610
       SERIAL_ERRORLNPGM(" - Invalid extruder number !");
610
       SERIAL_ERRORLNPGM(" - Invalid extruder number !");
611
       kill();
611
       kill();
612
+      return 0.0;
612
   } 
613
   } 
613
   #ifdef HEATER_0_USES_MAX6675
614
   #ifdef HEATER_0_USES_MAX6675
614
     if (e == 0)
615
     if (e == 0)

+ 2
- 0
README.md 查看文件

1
 ==========================
1
 ==========================
2
 Marlin 3D Printer Firmware
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
 Marlin has a GPL license because I believe in open development.
6
 Marlin has a GPL license because I believe in open development.
5
 Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.
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
 

正在加载...
取消
保存