XBoard: C11 and more warnings
Posted: Sat Feb 29, 2020 2:31 pm
Hi,
I changed CFLAGS to following in XBoard Makefile (any better way?). Now there seems to be some problems with timeZone.
Note that I used -Weverything but I removed this since it produced massive number of warnings.
Now:
I get:
What can I do ?
Edit: Corrected title.
I changed CFLAGS to following in XBoard Makefile (any better way?). Now there seems to be some problems with timeZone.
Code: Select all
CFLAGS = -std=c11 -Wall -Wextra -pedantic
Now:
Code: Select all
#if HAVE_GETTIMEOFDAY
#include <sys/time.h>
//#include <sys/timeb.h>
struct timeval timeVal;
struct timezone timeZone;
gettimeofday(&timeVal, &timeZone);
tm->sec = (long) timeVal.tv_sec;
tm->ms = (int) (timeVal.tv_usec / 1000L);
#else /*!HAVE_GETTIMEOFDAY*/
Code: Select all
backend.c: In function ‘GetTimeMark’:
backend.c:17839:21: error: storage size of ‘timeZone’ isn’t known
struct timezone timeZone;
^~~~~~~~
Edit: Corrected title.