From b8d8a64011fd4201e1ed8b8aff27c9480907c672 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Mon, 29 Apr 2024 17:51:26 +0200 Subject: [PATCH 1/3] Add PRINTF inside CX_CHECK to ease debug, and find the file/line of the error (cherry picked from commit c815e1eed409adf8153f41b93047637b25d62b66) --- include/cx_errors.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/cx_errors.h b/include/cx_errors.h index 2326c29fd..0e7a4f23c 100644 --- a/include/cx_errors.h +++ b/include/cx_errors.h @@ -12,12 +12,13 @@ * Check the error code of a function. * @hideinitializer */ -#define CX_CHECK(call) \ - do { \ - error = call; \ - if (error) { \ - goto end; \ - } \ +#define CX_CHECK(call) \ + do { \ + error = call; \ + if (error) { \ + PRINTF("[CX_CHECK] - %s: %d\n", __FILE__, __LINE__); \ + goto end; \ + } \ } while (0) /** From 2a02468951f6befee4829692b8edcea9a1f04955 Mon Sep 17 00:00:00 2001 From: Xavier Chapron Date: Thu, 2 May 2024 09:30:29 +0200 Subject: [PATCH 2/3] cx_errors.h: Fix OS build (cherry picked from commit 955d008ff99bc264a56f5fadb62f8936e0db337e) --- include/cx_errors.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/cx_errors.h b/include/cx_errors.h index 0e7a4f23c..469a39e39 100644 --- a/include/cx_errors.h +++ b/include/cx_errors.h @@ -12,6 +12,15 @@ * Check the error code of a function. * @hideinitializer */ +#ifdef HAVE_BOLOS +#define CX_CHECK(call) \ + do { \ + error = call; \ + if (error) { \ + goto end; \ + } \ + } while (0) +#else #define CX_CHECK(call) \ do { \ error = call; \ @@ -20,6 +29,7 @@ goto end; \ } \ } while (0) +#endif /** * Check the error code of a function and ignore From 9295cda959dd13769e6642e41c446514044fe5d4 Mon Sep 17 00:00:00 2001 From: Xavier Chapron Date: Mon, 13 May 2024 15:43:52 +0200 Subject: [PATCH 3/3] CI: Bump checkout action version (cherry picked from commit 0045635149738f31ceaf1d20637a1a827525ca60) --- .github/workflows/build_all_apps.yml | 6 +++--- .github/workflows/check_clang_static_analyzer.yml | 4 ++-- .github/workflows/pre-commit.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_all_apps.yml b/.github/workflows/build_all_apps.yml index 6abddb7bb..7fb5d0c19 100644 --- a/.github/workflows/build_all_apps.yml +++ b/.github/workflows/build_all_apps.yml @@ -16,7 +16,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install tomlq run: | @@ -96,14 +96,14 @@ jobs: steps: - name: Clone App - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: LedgerHQ/${{ matrix.repo_info.repo_name }} ref: ${{ matrix.repo_info.default_branch }} submodules: true - name: Clone SDK - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: sdk ref: ${{ inputs.sdk_branch }} diff --git a/.github/workflows/check_clang_static_analyzer.yml b/.github/workflows/check_clang_static_analyzer.yml index 27f9dc66c..62313a971 100644 --- a/.github/workflows/check_clang_static_analyzer.yml +++ b/.github/workflows/check_clang_static_analyzer.yml @@ -21,13 +21,13 @@ jobs: steps: - name: Clone Boilerplate - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: LedgerHQ/app-boilerplate ref: master - name: Clone SDK - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: sdk diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a19076b13..15f858b8b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,7 +6,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: '3.10'