Fix mpy-cross compile error with GCC13.

- GCC13 reports the following error when compiling mpy-cross:

main.c:313:6: error: conflicting types for ‘mp_import_stat’ due to enum/integer mismatch; have ‘uint(const char *)’ {aka ‘unsigned int(const char *)’} [-Werror=enum-int-mismatch]
  313 | uint mp_import_stat(const char *path) {
      |      ^~~~~~~~~~~~~~
In file included from ../py/compile.h:29,
                 from main.c:11:
../py/lexer.h:205:18: note: previous declaration of ‘mp_import_stat’ with type ‘mp_import_stat_t(const char *)’
  205 | mp_import_stat_t mp_import_stat(const char *path);
      |                  ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../py/mkrules.mk:62: build/main.o] Error 1
This commit is contained in:
flom84 2023-04-11 19:37:01 +02:00
parent 33ddf50d38
commit 3ca0131ddd
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ int main(int argc, char **argv) {
return main_(argc, argv); return main_(argc, argv);
} }
uint mp_import_stat(const char *path) { mp_import_stat_t mp_import_stat(const char *path) {
(void)path; (void)path;
return MP_IMPORT_STAT_NO_EXIST; return MP_IMPORT_STAT_NO_EXIST;
} }