Sasha Khapyorsky wrote: > On 11:57 Mon 12 Oct , Stan C. Smith wrote: >> >> Remove unused ifdef __WIN__ & redundant include. >> >> Signed-off-by: stan smith <[email protected]> > > Applied. Thanks. The question is below. > >> >> diff --git a/opensm/osmtest/osmtest.c b/opensm/osmtest/osmtest.c >> index c6ec955..82a814e 100644 --- a/opensm/osmtest/osmtest.c >> +++ b/opensm/osmtest/osmtest.c >> @@ -43,19 +43,13 @@ >> * >> */ >> >> -#ifdef __WIN__ >> -#pragma warning(disable : 4996) >> -#endif >> - >> #include <stdio.h> >> #include <stdlib.h> >> #include <string.h> >> -#ifdef __WIN__ >> -#include <complib/cl_timer.h> >> -#else >> +#ifndef __WIN__ >> #include <strings.h> >> -#include <sys/time.h> >> #endif > > I suppose that windows should have string.h, right? Assuming so could > we remove '#ifndef __WIN__' completely here?
Yes - I missed this in the linux env. According to the strings.h file, if string.h is included prior, then strings.h is a nop. Seems the include of strings.h could be removed along with the ifndef __WIN__. Good catch. How do you feel about replacing ifndef __WIN__ with ifdef __linux__ in other situations? > > Sasha > >> +#include <sys/time.h> >> #include <complib/cl_debug.h> >> #include "osmtest.h" _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
