1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-30 13:26:53 +00:00

fix some compiler warnings (#423)

* Pedantic C compilers want an extern declaration separate from initialization

* Remove duplicate definitions for fns in initdspdefs.h from display.h

* Remove misleading comments on structure member offsets and reorder to minimize padding
This commit is contained in:
Nick Briggs
2022-07-20 10:18:59 -07:00
committed by GitHub
parent e81345218a
commit 77957d421a
6 changed files with 30 additions and 36 deletions

View File

@@ -111,7 +111,7 @@ LispPTR *fixp_value(LispPTR *ptr) {
#define PAGES_IN_MBYTE 2048
void init_ifpage(int sysout_size) {
extern time_t MDate;
extern const time_t MDate;
extern int DisplayType;
extern int Storage_expanded;
int new_lastvmem;

View File

@@ -246,7 +246,7 @@ int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will cal
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
extern time_t MDate;
extern const time_t MDate;
extern int nokbdflag;
extern int nomouseflag;
#ifdef DOS

View File

@@ -41,7 +41,8 @@
int main(void) {
long dtime;
time(&dtime);
printf("long MDate= %ld;\n", dtime);
printf("extern const long MDate;\n", dtime);
printf("const long MDate = %ld;\n", dtime);
return (0);
}
#else
@@ -56,7 +57,8 @@ int main(void) {
*/
gettimeofday(&time, NULL);
printf("#include <time.h>\n");
printf("time_t MDate= %ld;\n", (long)time.tv_sec);
printf("extern const time_t MDate;\n");
printf("const time_t MDate = %ld;\n", (long)time.tv_sec);
return (0);
}