瀏覽代碼

Disable printf format warnings - too pedantic

main
PaulStoffregen 4 年之前
父節點
當前提交
ba177b0d22
共有 2 個檔案被更改,包括 6 行新增2 行删除
  1. +3
    -1
      teensy3/Print.h
  2. +3
    -1
      teensy4/Print.h

+ 3
- 1
teensy3/Print.h 查看文件

@@ -102,7 +102,9 @@ class Print
size_t println(const Printable &obj) { return obj.printTo(*this) + println(); }
int getWriteError() { return write_error; }
void clearWriteError() { setWriteError(0); }
int printf(const char *format, ...) __attribute__ ((format (printf, 2, 3)));
// format warnings are too pedantic - disable until newer toolchain offers better...
// https://forum.pjrc.com/threads/62473?p=256873&viewfull=1#post256873
int printf(const char *format, ...) /*__attribute__ ((format (printf, 2, 3)))*/;
int printf(const __FlashStringHelper *format, ...);
protected:
void setWriteError(int err = 1) { write_error = err; }

+ 3
- 1
teensy4/Print.h 查看文件

@@ -102,7 +102,9 @@ class Print
size_t println(const Printable &obj) { return obj.printTo(*this) + println(); }
int getWriteError() { return write_error; }
void clearWriteError() { setWriteError(0); }
int printf(const char *format, ...) __attribute__ ((format (printf, 2, 3)));
// format warnings are too pedantic - disable until newer toolchain offers better...
// https://forum.pjrc.com/threads/62473?p=256873&viewfull=1#post256873
int printf(const char *format, ...) /*__attribute__ ((format (printf, 2, 3)))*/;
int printf(const __FlashStringHelper *format, ...);
protected:
void setWriteError(int err = 1) { write_error = err; }

Loading…
取消
儲存