Skip to content

Commit

Permalink
Build updates/fixes
Browse files Browse the repository at this point in the history
* Imagine: Fix warnings in android/compat.c
* Imagine: Set C standard to C23
* Update CI build NDK to r27-beta2
  • Loading branch information
Robert Broglia committed Jul 21, 2024
1 parent 3f0c38c commit 754b955
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
run: |
mkdir imagine-sdk
mkdir EX-Emulators
wget "https://dl.google.com/android/repository/android-ndk-r27-beta1-linux.zip"
unzip android-ndk-r27-beta1-linux.zip
echo "ANDROID_NDK_PATH=${{ github.workspace }}/android-ndk-r27-beta1" >> $GITHUB_ENV
wget "https://dl.google.com/android/repository/android-ndk-r27-beta2-linux.zip"
unzip android-ndk-r27-beta2-linux.zip
echo "ANDROID_NDK_PATH=${{ github.workspace }}/android-ndk-r27-beta2" >> $GITHUB_ENV
echo "EMUFRAMEWORK_PATH=${{ github.workspace }}/EmuFramework" >> $GITHUB_ENV
echo "IMAGINE_PATH=${{ github.workspace }}/imagine" >> $GITHUB_ENV
echo "IMAGINE_SDK_PATH=${{ github.workspace }}/imagine-sdk" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions imagine/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ ifdef libNameExt
endif

CFLAGS_WARN += -Werror
CFLAGS_LANG = -std=gnu23

include $(IMAGINE_PATH)/make/imagineStaticLibTarget.mk

Expand Down
40 changes: 20 additions & 20 deletions imagine/src/base/android/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

int fstat64(int fd, struct stat64* buf) { return fstat(fd, (struct stat*)buf); }

void android_set_abort_message(const char* __msg) {}
void android_set_abort_message(const char*) {}

size_t __ctype_get_mb_cur_max(void) { return 1; }

Expand Down Expand Up @@ -40,78 +40,78 @@ int grantpt(int __fd __attribute((unused))) {
return 0; /* devpts does this all for us! */
}

int iswalnum_l(wint_t c, locale_t loc) {
int iswalnum_l(wint_t c, locale_t) {
return iswalnum(c);
}

int iswalpha_l(wint_t c, locale_t loc) {
int iswalpha_l(wint_t c, locale_t) {
return iswalpha(c);
}

int iswblank_l(wint_t c, locale_t loc) {
int iswblank_l(wint_t c, locale_t) {
return iswblank(c);
}

int iswcntrl_l(wint_t c, locale_t loc) {
int iswcntrl_l(wint_t c, locale_t) {
return iswcntrl(c);
}

int iswdigit_l(wint_t c, locale_t loc) {
int iswdigit_l(wint_t c, locale_t) {
return iswdigit(c);
}

int iswgraph_l(wint_t c, locale_t loc) {
int iswgraph_l(wint_t c, locale_t) {
return iswgraph(c);
}

int iswlower_l(wint_t c, locale_t loc) {
int iswlower_l(wint_t c, locale_t) {
return iswlower(c);
}

int iswprint_l(wint_t c, locale_t loc) {
int iswprint_l(wint_t c, locale_t) {
return iswprint(c);
}

int iswpunct_l(wint_t c, locale_t loc) {
int iswpunct_l(wint_t c, locale_t) {
return iswpunct(c);
}

int iswspace_l(wint_t c, locale_t loc) {
int iswspace_l(wint_t c, locale_t) {
return iswspace(c);
}

int iswupper_l(wint_t c, locale_t loc) {
int iswupper_l(wint_t c, locale_t) {
return iswupper(c);
}

int iswxdigit_l(wint_t c, locale_t loc) {
int iswxdigit_l(wint_t c, locale_t) {
return iswxdigit(c);
}

wint_t towupper_l(wint_t c, locale_t loc) {
wint_t towupper_l(wint_t c, locale_t) {
return towupper(c);
}

wint_t towlower_l(wint_t c, locale_t loc) {
wint_t towlower_l(wint_t c, locale_t) {
return towlower(c);
}

int strcoll_l(const char *s1, const char *s2, locale_t loc) {
int strcoll_l(const char *s1, const char *s2, locale_t) {
return strcoll(s1, s2);
}

size_t strxfrm_l(char *dest, const char *src, size_t n, locale_t loc) {
size_t strxfrm_l(char *dest, const char *src, size_t n, locale_t) {
return strxfrm(dest, src, n);
}

size_t strftime_l(char *s, size_t max, const char *format, const struct tm *tm, locale_t loc) {
size_t strftime_l(char *s, size_t max, const char *format, const struct tm *tm, locale_t) {
return strftime(s, max, format, tm);
}

int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t loc) {
int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t) {
return wcscoll(ws1, ws2);
}

size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t n, locale_t loc) {
size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t n, locale_t) {
return wcsxfrm(dest, src, n);
}

0 comments on commit 754b955

Please sign in to comment.