]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/env.c
-Wimplicit-fallthrough=1
[z180-stamp.git] / avr / env.c
index 8896004c8effb9729732fe451c01fa842caaab39..900f68979fdc7e2e087a0ace578c8e288d528b98 100644 (file)
--- a/avr/env.c
+++ b/avr/env.c
@@ -63,6 +63,7 @@ char env_get_char(uint_fast16_t index)
        switch (env_valid) {
        case 2:
                off += CONFIG_ENV_SIZE;
+               /* FALL TROUGH */
        case 1:
                ret = (char) eeprom_read_byte((const uint8_t *)off + index +
                                offsetof(env_t, data));
@@ -716,8 +717,8 @@ command_ret_t do_env_print(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED,
 
        /* print selected env vars */
        while (optind < argc) {
-               int rc = env_print(argv[optind], mode);
-               if (rc < 0) {
+               int len = env_print(argv[optind], mode);
+               if (len < 0) {
                        printf_P(PSTR("## Error: \"%s\" not defined\n"), argv[optind]);
                        rc = CMD_RET_FAILURE;
                }