Menu

Can you please fix this warning in filelister.cpp

2024-08-01
2024-08-02
  • Steve Albright

    Steve Albright - 2024-08-01

    cppcheck-2.14.1/cli/filelister.cpp:186:53: warning: ignoring attributes on template argument ‘int ()(DIR)’ [-Wignored-attributes]

    std::unique_ptr<dir, decltype(&closedir)=""> dir_deleter(dir, closedir); // line #186</dir,>

    Ubuntu 22.04

    Here's one way to ignore it

    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-Wignored-attributes"
                std::unique_ptr<DIR, decltype(&closedir)> dir_deleter(dir, closedir);
    #pragma GCC diagnostic pop
    
     
  • CHR

    CHR - 2024-08-02

    If it bothers you, you could open a PR at https://github.com/danmar/cppcheck/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.