PavelSindler
702a2e1883
Merge pull request #1004 from mkbel/fix_XYhoming_direction
...
Obey defined X and Y homing direction.
2018-08-05 20:18:30 +02:00
Marek Bel
5846707c5a
Remove local variable verbosity_level, which was masking function parameter of the same name. Remove duplicate code to derive verbosity level.
...
Problem manifested itself as compiler warning: sketch/Marlin_main.cpp:2881:6: warning: unused parameter 'verbosity_level' [-Wunused-parameter]
bool gcode_M45(bool onlyZ, int8_t verbosity_level)
2018-08-03 15:49:20 +02:00
Marek Bel
f6094a58f7
Fix compiler warning sketch/lcd.cpp:160:6: warning: unused parameter 'cols' [-Wunused-parameter].
2018-08-03 15:37:40 +02:00
Marek Bel
a85d5948c3
Make function static, save 38B flash.
2018-08-03 15:32:28 +02:00
Marek Bel
373b4a1ea9
Fix compiler warnings sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::unget' [-Wmissing-field-initializers]
...
FILE _lcdout = {0};
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::flags' [-Wmissing-field-initializers]
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::size' [-Wmissing-field-initializers]
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::len' [-Wmissing-field-initializers]
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::put' [-Wmissing-field-initializers]
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::get' [-Wmissing-field-initializers]
sketch/lcd.cpp:59:18: warning: missing initializer for member '__file::udata' [-Wmissing-field-initializers]
2018-08-03 15:25:52 +02:00
Marek Bel
0638e490c1
Fix compiler warnings: sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::unget' [-Wmissing-field-initializers]
...
FILE _uartout = {0};
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::flags' [-Wmissing-field-initializers]
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::size' [-Wmissing-field-initializers]
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::len' [-Wmissing-field-initializers]
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::put' [-Wmissing-field-initializers]
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::get' [-Wmissing-field-initializers]
sketch/Marlin_main.cpp:923:19: warning: missing initializer for member '__file::udata' [-Wmissing-field-initializers]
2018-08-03 15:23:24 +02:00
Marek Bel
0632f3b6d8
Fix compiler warnings: sketch/ConfigurationStore.cpp:17:13: warning: unused parameter 'name' [-Wunused-parameter]
...
static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size, char* name)
sketch/ConfigurationStore.cpp:45:13: warning: unused parameter 'name' [-Wunused-parameter]
static void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size, char* name)
2018-08-03 14:50:51 +02:00
Marek Bel
f7f4ba2512
Make functions static, save 270B of flash.
2018-08-03 14:44:56 +02:00
Marek Bel
bd907aec86
Fix 4 compiler warnings of type sketch/sm4.c:88:2: warning: 'register' is not at beginning of declaration [-Wold-style-declaration].
2018-08-03 14:35:18 +02:00
Marek Bel
d3360c6868
Fix compiler warning sketch/Marlin_main.cpp:9099:7: warning: unused variable 'response' [-Wunused-variable].
2018-08-02 21:46:50 +02:00
Marek Bel
e13e3a9dc4
Merge remote-tracking branch 'prusa3d/MK3' into fix_compiler_warnings
2018-08-02 21:42:55 +02:00
Marek Bel
2e61c0e289
Obey defined X and Y homing direction.
...
Problem manifested itself as sketch/Marlin_main.cpp:2288:13: warning: unused variable 'axis_home_dir' [-Wunused-variable]
2018-08-02 20:47:03 +02:00
Robert Pelnar
468873ec68
MMU2 - removed conditional translation for SNMM_V2, new module mmu
2018-08-02 18:54:00 +02:00
Marek Bel
63724c5f0e
Comment out variable used only for commented out debug.
2018-08-02 18:26:49 +02:00
Marek Bel
fd70078606
Remove or disable by preprocessor unused functions in ultralcd.cpp.
2018-08-02 18:18:31 +02:00
Marek Bel
268c52207b
Fix compiler warning: sketch/ultralcd.cpp:7457:7: warning: unused variable 'pressed' [-Wunused-variable].
2018-08-02 17:29:14 +02:00
Marek Bel
87a650f2cb
Fix compiler warning: sketch/ultralcd.cpp:6573:23: warning: array subscript has type 'char' [-Wchar-subscripts]
2018-08-02 17:25:32 +02:00
Marek Bel
02f5a60065
Fix compiler warning: sketch/ultralcd.cpp:6540:23: warning: array subscript has type 'char' [-Wchar-subscripts]
2018-08-02 17:23:11 +02:00
Marek Bel
05d455fc30
Fix compiler warning sketch/ultralcd.cpp:6301:7: warning: unused variable 'tempScrool' [-Wunused-variable].
2018-08-02 17:11:23 +02:00
Robert Pelnar
282ff6c577
removed unused union
2018-08-02 17:09:02 +02:00
Marek Bel
d85c36cc77
Fix compiler warning sketch/ultralcd.cpp:3588:9: warning: unused variable 'enc_dif' [-Wunused-variable]
2018-08-02 17:08:46 +02:00
Robert Pelnar
d378575a68
SNMM_V2 - default retraction declared as variable
2018-08-02 17:07:09 +02:00
Marek Bel
1898ef9896
Fix compiler warning sketch/ultralcd.cpp:2533:7: warning: unused variable '_cm' [-Wunused-variable]
2018-08-02 17:02:12 +02:00
Marek Bel
bf8808ce22
Fix compiler warning sketch/tmc2130.cpp: In function 'void tmc2130_set_wave(uint8_t, uint8_t, uint8_t)':
...
sketch/tmc2130.cpp:921:32: warning: 'reg' may be used uninitialized in this function [-Wmaybe-uninitialized]
This was completely innocent, as reg was zeroed inside for loop.
2018-08-02 16:50:04 +02:00
Robert Pelnar
10af023eae
Merge remote-tracking branch 'upstream/MK3' into MK3-new_lang
2018-08-02 16:32:59 +02:00
Marek Bel
3248d219f2
Restore motor power, after it is disabled in tmc2130_get_wave(). This bug manifested itself as compiler warning:
...
sketch/tmc2130.cpp:827:10: warning: unused variable 'pwr' [-Wunused-variable]
2018-08-02 16:23:30 +02:00
Marek Bel
9f68681a1b
Fix compiler warnings: sketch/tmc2130.cpp: In function 'void tmc2130_goto_step(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)':
...
sketch/tmc2130.cpp:795:94: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
sketch/tmc2130.cpp:807:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
sketch/tmc2130.cpp: In function 'void tmc2130_get_wave(uint8_t, uint8_t*, __file*)':
sketch/tmc2130.cpp:839:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2018-08-02 16:21:38 +02:00
Marek Bel
ea3d407aa7
Fix compiler warning: remove unused function float analog2tempPINDA(int raw).
2018-08-02 15:52:28 +02:00
Marek Bel
aee31bdb8d
Fix compiler warnings sketch/stepper.cpp: In function 'void babystep(uint8_t, bool)':
...
sketch/stepper.cpp:1429:20: warning: unused variable 'x' [-Wunused-variable]
volatile float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
sketch/stepper.cpp:1455:20: warning: unused variable 'x' [-Wunused-variable]
volatile float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
sketch/stepper.cpp:1485:20: warning: unused variable 'x' [-Wunused-variable]
volatile float x=1./float(axis+1); //absolutely useless
sketch/stepper.cpp: In function 'void microstep_init()':
sketch/stepper.cpp:1571:17: warning: unused variable 'microstep_modes' [-Wunused-variable]
const uint8_t microstep_modes[] = MICROSTEP_MODES;
2018-08-02 15:45:33 +02:00
Marek Bel
5ac98afeec
Fix compiler warning sketch/optiboot_w25x20cl.cpp: In function 'void optiboot_w25x20cl_enter()':
...
sketch/optiboot_w25x20cl.cpp:275:15: warning: variable 'desttype' set but not used [-Wunused-but-set-variable]
2018-08-02 14:55:38 +02:00
Marek Bel
660a4c0d75
Fix compiler warnings: sketch/Marlin_main.cpp: In function 'void process_commands()':
...
sketch/Marlin_main.cpp:6311:3: warning: 'filament' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (filament) {
sketch/Marlin_main.cpp:6310:44: warning: 'extruder' may be used uninitialized in this function [-Wmaybe-uninitialized]
printf_P(PSTR("Extruder: %d; "), extruder);
2018-08-02 14:28:39 +02:00
Marek Bel
79057f070b
Fix compiler warning sketch/lcd.cpp:509:1: warning: label 'end' defined but not used [-Wunused-label].
2018-08-02 14:13:29 +02:00
Marek Bel
1b299618c1
Fix compiler warnings: sketch/fsensor.cpp: In function 'void __vector_11()':
...
sketch/fsensor.cpp:370:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pat9125_y > 0) if (fsensor_oq_yd_min > pat9125_y) fsensor_oq_yd_min = (fsensor_oq_yd_min + pat9125_y) / 2;
^
sketch/fsensor.cpp:371:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pat9125_y >= 0) if (fsensor_oq_yd_max < pat9125_y) fsensor_oq_yd_max = (fsensor_oq_yd_max + pat9125_y) / 2;
2018-08-02 14:13:29 +02:00
Marek Bel
25c00393ff
Fix compiler warning sketch/fsensor.cpp:221:10: warning: unused variable 'fsensor_autoload_c_old' [-Wunused-variable]
2018-08-02 14:13:29 +02:00
Marek Bel
904fe7e886
Fix compiler warning: In file included from sketch/Marlin_main.cpp:67:0:
...
sketch/temperature.h: In function 'void M600_wait_for_user()':
sketch/temperature.h:142:30: warning: array subscript is above array bounds [-Warray-bounds]
target_temperature[extruder] = celsius;
2018-08-02 14:13:29 +02:00
Marek Bel
d66da30843
Fix compiler warning: sketch/Dcodes.cpp: In function 'void dcode_3()':
...
sketch/Dcodes.cpp:117:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < count; i++)
2018-08-02 14:13:29 +02:00
Marek Bel
15c598fd6a
Fix compiler warning: sketch/Dcodes.cpp: In function 'void print_eeprom(uint16_t, uint16_t, uint8_t)':
...
sketch/Dcodes.cpp:37:12: warning: unused variable 'data' [-Wunused-variable]
2018-08-02 14:13:29 +02:00
PavelSindler
1685f83020
Merge pull request #971 from mkbel/fix_menuData_compiler_warnings
...
Fix 98 compiler warnings of type: warning: dereferencing type-punned …
2018-08-02 09:42:54 +02:00
Marek Bel
ef8921d45e
Fix 10 compiler warnings of type: sketch/menu.cpp: In function 'void _menu_edit_int3()':
...
sketch/menu.cpp:272:51: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
#define _menu_data (*((menu_data_edit_t*)menu_data))
2018-08-01 22:43:36 +02:00
Marek Bel
93d2b37b5c
Fix 98 compiler warnings of type: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2018-08-01 22:43:27 +02:00
MRprusa3d
bafd290141
Sound
...
& TuneMenu
2018-08-01 22:34:58 +02:00
PavelSindler
ac60b3ebe7
Merge pull request #996 from PavelSindler/snmm_v2
...
M600 updated
2018-08-01 19:39:08 +02:00
XPila
618aea25d6
Merge pull request #995 from PavelSindler/filament_type
...
snmm v2: send filament type to mmu
2018-08-01 19:33:44 +02:00
PavelSindler
24e7f0d0ec
mmures fix
2018-08-01 19:29:50 +02:00
PavelSindler
06063118bd
M600 updated
2018-08-01 18:47:28 +02:00
Marek Bel
ca97e2232f
Merge remote-tracking branch 'ledvinap/MK3' into fix_compiler_warnings
2018-08-01 18:44:05 +02:00
Marek Bel
b0077182e5
Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings
2018-08-01 17:53:49 +02:00
Marek Bel
1a2d7657dc
Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings
2018-08-01 17:39:54 +02:00
Marek Bel
6f824730af
Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings
2018-08-01 17:37:09 +02:00
Marek Bel
a8f73b3915
Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings
2018-08-01 17:19:34 +02:00