浏览代码

Clear up some compiler warnings

Scott Lahteine 6 年前
父节点
当前提交
9bf5d4331c
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1
    1
      Marlin/src/feature/tmc_util.cpp
  2. 2
    2
      Marlin/src/sd/cardreader.cpp

+ 1
- 1
Marlin/src/feature/tmc_util.cpp 查看文件

@@ -138,7 +138,7 @@
138 138
 
139 139
     // Report if a warning was triggered
140 140
     if (data.is_otpw && st.otpw_count == 0) {
141
-      char timestamp[10];
141
+      char timestamp[14];
142 142
       duration_t elapsed = print_job_timer.duration();
143 143
       const bool has_days = (elapsed.value > 60*60*24L);
144 144
       (void)elapsed.toDigital(timestamp, has_days);

+ 2
- 2
Marlin/src/sd/cardreader.cpp 查看文件

@@ -544,8 +544,8 @@ void CardReader::checkautostart() {
544 544
       && !jobRecoverFileExists() // Don't run auto#.g when a resume file exists
545 545
     #endif
546 546
   ) {
547
-    char autoname[10];
548
-    sprintf_P(autoname, PSTR("auto%i.g"), int(autostart_index));
547
+    char autoname[8];
548
+    sprintf_P(autoname, PSTR("auto%c.g"), autostart_index + '0');
549 549
     dir_t p;
550 550
     root.rewind();
551 551
     while (root.readDir(&p, NULL) > 0) {

正在加载...
取消
保存