From ef774ce0b4c3296c1b9a22625f5eba8d5471d106 Mon Sep 17 00:00:00 2001 From: Dylan G <1565516+Helloman892@users.noreply.github.com> Date: Sun, 31 May 2020 17:45:05 +0100 Subject: [PATCH] Now compiles under GCC 10 (GCC 10 now defaults to -fno-common) --- include/colors.h | 2 +- include/draw.h | 4 ++-- include/fs.h | 8 ++++---- source/fs.c | 6 +++++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/colors.h b/include/colors.h index b9ed003..cb70081 100644 --- a/include/colors.h +++ b/include/colors.h @@ -31,7 +31,7 @@ typedef u32 Color; -enum { +typedef enum { COLOR_BACKGROUND, //silver-y black COLOR_ACCENT, COLOR_WHITE, diff --git a/include/draw.h b/include/draw.h index f11596c..ea6d08c 100644 --- a/include/draw.h +++ b/include/draw.h @@ -125,7 +125,7 @@ typedef enum { #define BUTTONS_INFO_LINES 4 #define BUTTONS_INFO_COLUNMNS 2 -enum { +typedef enum { BUTTONS_Y_INFO = BUTTONS_START_Y+5, BUTTONS_Y_LINE_1 = BUTTONS_START_Y + BUTTONS_STEP*1, @@ -173,4 +173,4 @@ void draw_base_interface(void); void draw_grid_interface(Entry_List_s* list, Instructions_s instructions); void draw_interface(Entry_List_s* list, Instructions_s instructions); -#endif \ No newline at end of file +#endif diff --git a/include/fs.h b/include/fs.h index a80bebf..b9f5012 100644 --- a/include/fs.h +++ b/include/fs.h @@ -29,9 +29,9 @@ #include "common.h" -FS_Archive ArchiveSD; -FS_Archive ArchiveHomeExt; -FS_Archive ArchiveThemeExt; +extern FS_Archive ArchiveSD; +extern FS_Archive ArchiveHomeExt; +extern FS_Archive ArchiveThemeExt; Result open_archives(void); Result close_archives(void); @@ -43,4 +43,4 @@ u32 zip_file_to_buf(char *file_name, u16 *zip_path, char **buf); Result buf_to_file(u32 size, FS_Path path, FS_Archive archive, char *buf); void remake_file(FS_Path path, FS_Archive archive, u32 size); -#endif \ No newline at end of file +#endif diff --git a/source/fs.c b/source/fs.c index 68b2ac3..015cb2c 100644 --- a/source/fs.c +++ b/source/fs.c @@ -31,6 +31,10 @@ #include #include + +FS_Archive ArchiveSD; +FS_Archive ArchiveHomeExt; +FS_Archive ArchiveThemeExt; Result open_archives(void) { @@ -203,4 +207,4 @@ void remake_file(FS_Path path, FS_Archive archive, u32 size) char *buf = calloc(size, 1); buf_to_file(size, path, archive, buf); free(buf); -} \ No newline at end of file +}