diff --git a/qe.h b/qe.h index 309aea3..445aa60 100644 --- a/qe.h +++ b/qe.h @@ -1340,6 +1340,8 @@ void eb_delete_properties(EditBuffer *b, int offset, int offset2); #else /* QE_MODULE */ +void init_all_modules(void); + #if (defined(__GNUC__) || defined(__TINYC__)) && defined(CONFIG_INIT_CALLS) #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) /* same method as the linux kernel... */ @@ -1367,8 +1369,6 @@ void eb_delete_properties(EditBuffer *b, int offset, int offset2); #define qe_module_exit(fn) -void init_all_modules(void); - #endif #endif /* QE_MODULE */ diff --git a/qescript.c b/qescript.c index 806ae08..3076a7e 100644 --- a/qescript.c +++ b/qescript.c @@ -429,8 +429,9 @@ static int qe_cfg_append(QEmacsDataSource *ds, QEValue *sp, const char *p, size_ static int qe_cfg_format(QEmacsDataSource *ds, QEValue *sp) { char buf[256]; char fmt[16]; - /* prevent warning on variable format */ - int (*fun)(char *buf, size_t size, const char *fmt, ...) = snprintf; + /* Use function pointer and cast to prevent warning on variable format */ + int (*fun)(char *buf, size_t size, const char *fmt, ...) = + (int (*)(char *buf, size_t size, const char *fmt, ...))snprintf; char *start, *p; int c, len;