]> git.sur5r.net Git - openocd/blobdiff - src/jtag/zy1000/zy1000.c
zy1000: fix compile error with gcc 8.1.1
[openocd] / src / jtag / zy1000 / zy1000.c
index 271a28177b8b101c34ae62a7553dcf71c193e463..4e53dd1f751af1666559437ce6d6ac0286406a3e 100644 (file)
@@ -145,8 +145,8 @@ static int zy1000_power_dropout(int *dropout)
 static void waitSRST(bool asserted)
 {
        bool first = true;
-       long long start = 0;
-       long total = 0;
+       int64_t start = 0;
+       int64_t total = 0;
        const char *mode = asserted ? "assert" : "deassert";
 
        for (;; ) {
@@ -167,7 +167,7 @@ static void waitSRST(bool asserted)
                keep_alive();
 
                if (total > 5000) {
-                       LOG_ERROR("SRST took too long to %s: %dms", mode, (int)total);
+                       LOG_ERROR("SRST took too long to %s: %" PRId64 "ms", mode, total);
                        break;
                }
        }
@@ -265,8 +265,8 @@ COMMAND_HANDLER(handle_power_command)
                        bool enable;
                        COMMAND_PARSE_ON_OFF(CMD_ARGV[0], enable);
                        setPower(enable);
-                       /* fall through */
                }
+                       /* fall through */
                case 0:
                        LOG_INFO("Target power %s", savePower ? "on" : "off");
                        break;