Skip to content

Commit

Permalink
Fix ignored-attributes warning for unique_ptr declaration
Browse files Browse the repository at this point in the history
The attribute `__nonnull` was added to `fclose` in glibc 2.38, which
causes a warning when using its `decltype` on a template argument.
  • Loading branch information
joe-rivos committed Oct 15, 2024
1 parent aacfc53 commit a93eb1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/log_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class log_file_t
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

0 comments on commit a93eb1b

Please sign in to comment.