From cfb98ef682be2ffb75e7d3d741afc721e054e391 Mon Sep 17 00:00:00 2001 From: Erik van der Zalm Date: Thu, 15 May 2014 22:09:50 +0200 Subject: [PATCH] More coverity fixes --- Marlin/Marlin_main.cpp | 2 +- Marlin/temperature.cpp | 1 + README.md | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ebc36bc1af..53d829acf0 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2468,7 +2468,7 @@ void process_commands() if(pin_state >= -1 && pin_state <= 1){ - for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++) + for(int8_t i = 0; i < (int8_t)(sizeof(sensitive_pins)/sizeof(int)); i++) { if (sensitive_pins[i] == pin_number) { diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index a199f4e742..aac6ca66f5 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -609,6 +609,7 @@ static float analog2temp(int raw, uint8_t e) { SERIAL_ERROR((int)e); SERIAL_ERRORLNPGM(" - Invalid extruder number !"); kill(); + return 0.0; } #ifdef HEATER_0_USES_MAX6675 if (e == 0) diff --git a/README.md b/README.md index 94552684ea..0b955540ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ ========================== Marlin 3D Printer Firmware ========================== +[![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) + Marlin has a GPL license because I believe in open development. Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.