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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user