• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender-mcu / 1510175862
2%
main: 61%

Build:
Build:
LAST BUILD BRANCH: pr_209
DEFAULT BRANCH: main
Ran 24 Oct 2024 08:17AM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2024 08:14AM UTC coverage: 2.006%. First build
1510175862

push

gitlab-ci

lluiscampos
chore: Move variable declaration so that its always initialized at END

Clears `clang` warning:
```
.../mender-api.c:250:9: error: variable 'provides' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
  250 |     if (NULL == cJSON_AddStringToObject(json_provides, "device_type", mender_api_config.device_type)) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/lib/clang/18/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |              ^
.../mender-api.c:302:35: note: uninitialized use occurs here
  302 |     mender_utils_free_linked_list(provides);
      |                                   ^~~~~~~~
.../mender-api.c:250:5: note: remove the 'if' if its condition is always false
  250 |     if (NULL == cJSON_AddStringToObject(json_provides, "device_type", mender_api_config.device_type)) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251 |         mender_log_error("Unable to allocate memory");
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252 |         goto END;
      |         ~~~~~~~~~
  253 |     }
      |     ~

```

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>

31 of 1545 relevant lines covered (2.01%)

0.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1510175862.1 24 Oct 2024 08:17AM UTC 13
2.01
Source Files on build 1510175862
  • Tree
  • List 13
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • GitLab CI Build #1510175862
  • f3b1e0dc on github
  • Next Build on pr_99 (#1510560513)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc