Menu

timercmp() < seems to break cppcheck parsing

2023-02-10
2023-02-28
  • Neil Matthews

    Neil Matthews - 2023-02-10

    The "<" (or possibly ">") in timercmp() seems to break cppcheck parsing (unsurprisingly).

    #include <sys/time.h>
    
    bool test_times(timeval t_now, timeval t_then)
    {
        return !timercmp(&t_now, &t_then, <);
    }
    
     
  • CHR

    CHR - 2023-02-14

    Have you tried passing --library=gnu?

     
  • woko1754

    woko1754 - 2023-02-25

    This does not work for me, because I do cross-development for raspberry pi on Windows. Will there be a switch for it in the gui ?

     
  • Neil Matthews

    Neil Matthews - 2023-02-28

    Apologies -- should have replied earlier. Thanks for the --library=gnu option -- but I'm not sure how one would know that it might solve the problem? Maybe a hint would be useful if parsing fails?

    I'll leave the cross-platform discussion to take its course now.

     

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.