Browse Source

Fix ignored-attributes warning for unique_ptr declaration

The attribute `__nonnull` was added to `fclose` in glibc 2.38, which
causes a warning when using its `decltype` on a template argument.
pull/1835/head
Joseph Faulls 2 years ago
parent
commit
a93eb1b808
  1. 2
      riscv/log_file.h

2
riscv/log_file.h

@ -31,7 +31,7 @@ public:
FILE *get() { return wrapped_file ? wrapped_file.get() : stderr; }
private:
std::unique_ptr<FILE, decltype(&fclose)> wrapped_file;
std::unique_ptr<FILE, int(*)(FILE*)> wrapped_file;
};
#endif

Loading…
Cancel
Save