Skip to content

Commit b0ad604

Browse files
committed
codeql
Signed-off-by: Anas Nashif <[email protected]>
1 parent dd974b3 commit b0ad604

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

.github/workflows/codeql.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
include:
2929
- language: python
3030
build-mode: none
31+
- language: c-cpp
32+
build-mode: manual
3133
- language: actions
3234
build-mode: none
3335
config: ./.github/codeql/codeql-actions-config.yml
@@ -37,6 +39,9 @@ jobs:
3739
steps:
3840
- name: Checkout
3941
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42+
with:
43+
path: zephyr
44+
fetch-depth: 0
4045

4146
- name: Initialize CodeQL
4247
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
@@ -46,11 +51,34 @@ jobs:
4651
queries: security-extended
4752
config-file: ${{ matrix.config }}
4853

54+
- name: Set Up Python ${{ matrix.python-version }}
55+
if: matrix.build-mode == 'manual'
56+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
57+
with:
58+
python-version: ${{ matrix.python-version }}
59+
cache: pip
60+
cache-dependency-path: scripts/requirements-actions.txt
61+
62+
- name: install-packages
63+
if: matrix.build-mode == 'manual'
64+
working-directory: zephyr
65+
run: |
66+
pip install -r scripts/requirements-actions.txt --require-hashes
67+
sudo apt-get update -y
68+
sudo apt-get install -y lcov
69+
70+
- name: Setup Zephyr project
71+
if: matrix.build-mode == 'manual'
72+
uses: zephyrproject-rtos/action-zephyr-setup@f7b70269a8eb01f70c8e710891e4c94972a2f6b4 # v1.0.6
73+
with:
74+
app-path: zephyr
75+
toolchains: all
76+
4977
- if: matrix.build-mode == 'manual'
78+
working-directory: zephyr
5079
shell: bash
5180
run: |
52-
echo "nothing yet"
53-
exit 0
81+
west build -b qemu_x86 samples/hello_world
5482
5583
- name: Perform CodeQL Analysis
5684
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13

kernel/init.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ static K_KERNEL_PINNED_STACK_ARRAY_DEFINE(z_idle_stacks,
6161
CONFIG_MP_MAX_NUM_CPUS,
6262
CONFIG_IDLE_STACK_SIZE);
6363

64-
struct fopen fopen;
65-
int fopen(int fopen)
66-
{
67-
return 0;
68-
}
69-
7064
static void z_init_static_threads(void)
7165
{
7266
STRUCT_SECTION_FOREACH(_static_thread_data, thread_data) {

0 commit comments

Comments
 (0)