Skip to content

Commit

Permalink
refactor: clear compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Dec 9, 2023
1 parent a1f45b7 commit e8fff67
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 351 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
os: ['ubuntu-latest', 'windows-2019']
runs-on: ${{ matrix.os }}
name: "Builds binaries on ${{ matrix.os }}"
steps:
Expand All @@ -25,7 +25,9 @@ jobs:

- name: Install tools
if: runner.os == 'Linux'
run: sudo apt install debhelper lcov valgrind -yy
run: |
sudo apt-get update --fix-missing
sudo apt-get install debhelper lcov valgrind -yy
- name: Configure for coverage mode
if: runner.os == 'Linux'
Expand Down Expand Up @@ -98,7 +100,7 @@ jobs:
xmake package
xmake install -o dist/lcui-package
- name: Package exmaples
- name: Package examples
run: |
cd examples
xmake -P . -v -y
Expand All @@ -122,7 +124,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.xmake/.cache/packages
key: ${{ runner.os }}-xmake-pacages
key: ${{ runner.os }}-xmake-packages

release:
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
2 changes: 1 addition & 1 deletion examples/fabric/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_requires("cairo 1.17.6")
add_requires("cairo")

target("fabric")
set_kind("binary")
Expand Down
2 changes: 1 addition & 1 deletion lib/css/tests/test_css_computed.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static void check_length(const char *str, css_numeric_value_t actual,
ctest_equal_int(str, (int)actual, (int)expected);
}

static test_button_focus_style(void)
static void test_button_focus_style(void)
{
css_selector_t *selector;
css_style_decl_t *result;
Expand Down
16 changes: 8 additions & 8 deletions lib/i18n/tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@ void test_i18n(void)

i18n_change_language(L"en");

ctest_equal_bool("i18n_translate(L\"name\") == L\"English\")",
ctest_equal_bool("en: i18n_translate(L\"name\") == L\"English\")",
wcscmp(i18n_translate(L"name"), L"English") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.ok\") == L\"Ok\")",
ctest_equal_bool("en: i18n_translate(L\"button.ok\") == L\"Ok\")",
wcscmp(i18n_translate(L"button.ok"), L"Ok") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.notfound\") == NULL)",
ctest_equal_bool("en: i18n_translate(L\"button.notfound\") == NULL)",
i18n_translate(L"button.notfound")== NULL,
true);

i18n_change_language(L"zh-CN");

ctest_equal_bool("i18n_translate(L\"name\") == L\"中文\")",
wcscmp(i18n_translate(L"name"), L"中文") == 0,
ctest_equal_bool("zh-CN: i18n_translate(L\"name\")",
wcscmp(i18n_translate(L"name"), L"\u4E2D\u6587") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.ok\") == L\"确定\")",
wcscmp(i18n_translate(L"button.ok"), L"确定") == 0,
ctest_equal_bool("zh-CN: i18n_translate(L\"button.ok\")",
wcscmp(i18n_translate(L"button.ok"), L"\u786E\u5B9A") == 0,
true);

ctest_equal_bool("i18n_translate(L\"button.notfound\") == NULL)",
ctest_equal_bool("zh-CN: i18n_translate(L\"button.notfound\") == NULL",
i18n_translate(L"button.notfound")== NULL,
true);
i18n_clear();
Expand Down
Loading

0 comments on commit e8fff67

Please sign in to comment.