Follow-up Comment #2, bug #35265 (project avrdude): command line was 'cppcheck --enable=all .'
cppcheck version is 'Cppcheck 1.49' 'Our' usleep is the old posix usleep (except on Windows were we have a replacement in ppiwin.c). But: POSIX.1-2001 declares this function obsolete; use nanosleep(2) instead. POSIX.1-2008 removes the specification of usleep(). (see https://www.kernel.org/doc/man-pages/online/pages/man3/usleep.3.html) So we better replace all occurrences of usleep by an own wrapper microsleep. To use nanosleep we have check it in the configure file. I would put this wrapper in a new C-file (avrdude.c?, as we have an avrdude.h defining a usleep for Windows.) I also would move the implementations of usleep and gettimeofday from ppiwin.c to this new file as they are used not only by the parallel port programmers. _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?35265> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avrdude-dev
