Error: SHELLCHECK_WARNING (CWE-398): [#def1] /usr/bin/mir-smoke-test-runner:14:42: warning[SC2061]: Quote the parameter to -name so the shell won't interpret it. # 12| # 13| # Start with eglinfo for the system # 14|-> client_list="eglinfo `find ${root} -name mir_demo_client_* | grep -v bin$`" # 15| echo "I: client_list=" ${client_list} # 16| Error: SHELLCHECK_WARNING (CWE-477): [#def2] /usr/bin/miral-app:12:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 10| while [ $# -gt 0 ] # 11| do # 12|-> if [ "$1" == "--help" -o "$1" == "-h" ] # 13| then # 14| echo "$(basename $0) - Handy launch script for a hosted miral \"desktop session\"" Error: SHELLCHECK_WARNING (CWE-569): [#def3] /usr/bin/miral-app:42:111: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems. # 40| fi # 41| # miral-shell can launch it's own terminal with Ctrl-Alt-T # 42|-> MIR_SERVER_ENABLE_X11=1 MIR_SERVER_SHELL_TERMINAL_EMULATOR=${terminal} exec ${gdb} ${bindir}${miral_server} $* # 43| else # 44| # miral-kiosk (and mir_demo_server) need a terminal launched, so we need to manage the WAYLAND_DISPLAY etc. here. Error: SHELLCHECK_WARNING (CWE-569): [#def4] /usr/bin/miral-app:54:65: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems. # 52| then # 53| # Start miral-kiosk server with the chosen WAYLAND_DISPLAY # 54|-> WAYLAND_DISPLAY=${wayland_display} ${bindir}${miral_server} $*& # 55| miral_server_pid=$! # 56| unset DISPLAY Error: SHELLCHECK_WARNING (CWE-569): [#def5] /usr/bin/miral-app:63:96: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems. # 61| # 62| # Start mir_demo_server with the chosen WAYLAND_DISPLAY # 63|-> MIR_SERVER_ENABLE_X11=1 WAYLAND_DISPLAY=${wayland_display} ${gdb} ${bindir}${miral_server} $* --x11-displayfd 5 5>${x11_display_file}& # 64| miral_server_pid=$! # 65| Error: SHELLCHECK_WARNING (CWE-571): [#def6] /usr/bin/miral-app:69:14: warning[SC2155]: Declare and assign separately to avoid masking return values. # 67| then # 68| # ${x11_display_file} contains the X11 display # 69|-> export DISPLAY=:$(cat "${x11_display_file}") # 70| rm "${x11_display_file}" # 71| else Error: SHELLCHECK_WARNING (CWE-156): [#def7] /usr/bin/miral-app:87:48: warning[SC2046]: Quote this to prevent word splitting. # 85| exit 1 # 86| fi # 87|-> inotifywait -qq --timeout 5 --event create $(dirname "${XDG_RUNTIME_DIR}/${wayland_display}") # 88| done # 89| Error: CPPCHECK_WARNING (CWE-476): [#def8] mir-2.20.2/examples/client/wayland_client.c:152: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 150| { # 151| void* pool_data = NULL; # 152|-> struct wl_shm_pool* shm_pool = make_shm_pool(globals.shm, ctx->width * ctx->height * pixel_size, &pool_data); # 153| # 154| b->buffer = wl_shm_pool_create_buffer(shm_pool, 0, ctx->width, ctx->height, ctx->width*pixel_size, WL_SHM_FORMAT_ARGB8888); Error: CPPCHECK_WARNING (CWE-476): [#def9] mir-2.20.2/examples/client/wayland_client.c:154: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 152| struct wl_shm_pool* shm_pool = make_shm_pool(globals.shm, ctx->width * ctx->height * pixel_size, &pool_data); # 153| # 154|-> b->buffer = wl_shm_pool_create_buffer(shm_pool, 0, ctx->width, ctx->height, ctx->width*pixel_size, WL_SHM_FORMAT_ARGB8888); # 155| b->available = true; # 156| b->width = ctx->width; Error: CPPCHECK_WARNING (CWE-476): [#def10] mir-2.20.2/examples/client/wayland_client.c:156: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 154| b->buffer = wl_shm_pool_create_buffer(shm_pool, 0, ctx->width, ctx->height, ctx->width*pixel_size, WL_SHM_FORMAT_ARGB8888); # 155| b->available = true; # 156|-> b->width = ctx->width; # 157| b->height = ctx->height; # 158| b->content_area = pool_data; Error: CPPCHECK_WARNING (CWE-476): [#def11] mir-2.20.2/examples/client/wayland_client.c:157: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 155| b->available = true; # 156| b->width = ctx->width; # 157|-> b->height = ctx->height; # 158| b->content_area = pool_data; # 159| wl_buffer_add_listener(b->buffer, &buffer_listener, ctx); Error: CPPCHECK_WARNING (CWE-476): [#def12] mir-2.20.2/examples/client/wayland_client.c:534: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 532| # 533| draw_context* ctx = calloc(1, sizeof *ctx); # 534|-> ctx->display = display; # 535| ctx->surface = wl_compositor_create_surface(globals.compositor); # 536| ctx->width = 400; Error: CPPCHECK_WARNING (CWE-476): [#def13] mir-2.20.2/examples/client/wayland_client.c:535: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 533| draw_context* ctx = calloc(1, sizeof *ctx); # 534| ctx->display = display; # 535|-> ctx->surface = wl_compositor_create_surface(globals.compositor); # 536| ctx->width = 400; # 537| ctx->height = 400; Error: CPPCHECK_WARNING (CWE-476): [#def14] mir-2.20.2/examples/client/wayland_client.c:536: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 534| ctx->display = display; # 535| ctx->surface = wl_compositor_create_surface(globals.compositor); # 536|-> ctx->width = 400; # 537| ctx->height = 400; # 538| Error: CPPCHECK_WARNING (CWE-476): [#def15] mir-2.20.2/examples/client/wayland_client.c:537: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 535| ctx->surface = wl_compositor_create_surface(globals.compositor); # 536| ctx->width = 400; # 537|-> ctx->height = 400; # 538| # 539| for (buffer* b = ctx->buffers; b != ctx->buffers + NO_OF_BUFFERS ; ++b) Error: CPPCHECK_WARNING (CWE-476): [#def16] mir-2.20.2/examples/client/wayland_client.c:539: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 537| ctx->height = 400; # 538| # 539|-> for (buffer* b = ctx->buffers; b != ctx->buffers + NO_OF_BUFFERS ; ++b) # 540| { # 541| prepare_buffer(b, ctx); Error: CPPCHECK_WARNING (CWE-476): [#def17] mir-2.20.2/examples/client/wayland_client.c:544: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 542| } # 543| # 544|-> struct xdg_surface* shell_surface = xdg_wm_base_get_xdg_surface(globals.xdg_wm_base, ctx->surface); # 545| xdg_surface_add_listener(shell_surface, &shell_surface_listener, NULL); # 546| Error: CPPCHECK_WARNING (CWE-480): [#def18] mir-2.20.2/examples/mir_demo_server/server_example.cpp:93: error[rethrowNoCurrentException]: Rethrowing current exception with 'throw;', it seems there is no current exception to rethrow. If there is no current exception this calls std::terminate(). More: https://isocpp.org/wiki/faq/exceptions#throw-without-an-object # 91| { # 92| mir::report_exception(); # 93|-> throw; # 94| } # 95| catch (mir::AbnormalExit const& /*error*/) Error: CPPCHECK_WARNING (CWE-562): [#def19] mir-2.20.2/src/platform/graphics/drm_formats.cpp:595: error[returnDanglingLifetime]: Returning object that points to local variable 'vendor' that will be invalid when returning. # 593| if (vendor) # 594| { # 595|-> return vendor.get(); # 596| } # 597| return "(UNKNOWN VENDOR)"; Error: CPPCHECK_WARNING (CWE-562): [#def20] mir-2.20.2/src/platform/graphics/drm_formats.cpp:606: error[returnDanglingLifetime]: Returning object that points to local variable 'name' that will be invalid when returning. # 604| if (name) # 605| { # 606|-> return name.get(); # 607| } # 608| return "(UNKNOWN MODIFIER)"; Error: CPPCHECK_WARNING (CWE-415): [#def21] mir-2.20.2/src/server/shm_backing.cpp:181: error[doubleFree]: Memory pointed to by 'old_handler' is freed twice. # 179| // This is our handler; we don't need to save it, but we *do* need to # 180| // delete the struct sigaction we've new'd above. # 181|-> delete old_handler; # 182| } # 183| } Error: CPPCHECK_WARNING (CWE-562): [#def22] mir-2.20.2/src/wrapper.c:70: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 68| printf("exec=%s\n", path); # 69| # 70|-> argv[0] = path; # 71| execv(argv[0], argv); # 72| Error: CPPCHECK_WARNING (CWE-664): [#def23] mir-2.20.2/tests/include/mir/test/doubles/mock_drm.h:215: error[mismatchingContainers]: Iterators of different containers 'a' and 'b' are used together. # 213| auto operator()(std::unique_ptr<char[]> const& a, std::unique_ptr<char[]> const& b) const -> bool # 214| { # 215|-> return a.get() < b.get(); # 216| } # 217| struct is_transparent; Error: CPPCHECK_WARNING (CWE-562): [#def24] mir-2.20.2/tests/mir_test_doubles/fake_alarm_factory.cpp:152: error[danglingLifetime]: Non-local variable 'alarms' will use object that points to local variable 'alarm'. # 150| alarms.erase(std::remove(alarms.begin(), alarms.end(), destroying), alarms.end()); # 151| }); # 152|-> alarms.push_back(static_cast<FakeAlarm*>(alarm.get())); # 153| return alarm; # 154| } Error: CPPCHECK_WARNING (CWE-476): [#def25] mir-2.20.2/tests/performance-tests/system_performance_test.cpp:62: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c # 60| char* argv[256] = {buf}; # 61| char *c = buf; # 62|-> while (*c) # 63| { # 64| if (*c == ' ') Error: CPPCHECK_WARNING (CWE-457): [#def26] mir-2.20.2/tests/unit-tests/shell/test_persistent_surface_store_id.cpp:44: error[uninitvar]: Uninitialized variable: first_id # 42| Id first_id; # 43| # 44|-> auto const buf = first_id.serialize_to_string(); # 45| Id const second_id{buf}; # 46| Error: CPPCHECK_WARNING (CWE-457): [#def27] mir-2.20.2/tests/unit-tests/shell/test_persistent_surface_store_id.cpp:56: error[uninitvar]: Uninitialized variable: first_id # 54| Id const first_id; # 55| # 56|-> auto const second_id = first_id; # 57| # 58| EXPECT_THAT(second_id, Eq(first_id)); Error: CPPCHECK_WARNING (CWE-457): [#def28] mir-2.20.2/tests/unit-tests/test_glib_main_loop.cpp:1288: error[uninitvar]: Uninitialized variable: raw_alarm # 1286| [&raw_alarm, cancel_didnt_deadlock]() # 1287| { # 1288|-> raw_alarm->cancel(); # 1289| cancel_didnt_deadlock->raise(); # 1290| }); Error: CPPCHECK_WARNING (CWE-457): [#def29] mir-2.20.2/tests/unit-tests/test_glib_main_loop.cpp:1317: error[uninitvar]: Uninitialized variable: raw_alarm # 1315| [&raw_alarm, cancel_didnt_deadlock]() # 1316| { # 1317|-> delete raw_alarm; # 1318| cancel_didnt_deadlock->raise(); # 1319| }); Error: CPPCHECK_WARNING (CWE-457): [#def30] mir-2.20.2/tests/unit-tests/test_observer_multiplexer.cpp:410: error[uninitvar]: Uninitialized variable: values_seen # 408| # 409| std::array<bool, 10> values_seen; # 410|-> std::array<std::string, values_seen.size()> values; # 411| for (auto i = 0u; i < values.size(); ++i) # 412| { Error: CPPCHECK_WARNING (CWE-457): [#def31] mir-2.20.2/tests/unit-tests/test_observer_multiplexer.cpp:577: error[uninitvar]: Uninitialized variable: observer_notified # 575| # 576| std::array<bool, 100> observer_notified; # 577|-> std::array<std::shared_ptr<NiceMock<MockObserver>>, observer_notified.size()> observers; # 578| # 579| for (auto i = 0u; i < observers.size(); ++i)
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-15.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | mir-2.20.2-1.fc43 |
store-results-to | /tmp/tmpcxudve7n/mir-2.20.2-1.fc43.tar.xz |
time-created | 2025-04-25 14:37:35 |
time-finished | 2025-04-25 14:49:45 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpcxudve7n/mir-2.20.2-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcxudve7n/mir-2.20.2-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |