Bug Summary

File:_build/../libvnck/test-selector.c
Warning:line 66, column 5
This statement is never executed

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test-selector.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/_build -fcoverage-compilation-dir=/rootdir/_build -resource-dir /usr/lib/llvm-19/lib/clang/19 -I libvnck/test-selector.p -I libvnck -I ../libvnck -I . -I .. -I /usr/include/cairo -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/pixman-1 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/harfbuzz -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/gio-unix-2.0 -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/startup-notification-1.0 -D _FILE_OFFSET_BITS=64 -D G_LOG_DOMAIN="Vnck" -D VNCK_I_KNOW_THIS_IS_UNSTABLE -D VNCK_LOCALEDIR="/usr/local/share/locale" -D VNCK_COMPILATION -D SN_API_NOT_YET_FROZEN=1 -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-08-10-112340-9461-1 -x c ../libvnck/test-selector.c
1/* vim: set sw=2 et: */
2
3#include <libvnck/libvnck.h>
4#include <ctk/ctk.h>
5
6static gboolean skip_tasklist = FALSE(0);
7
8static GOptionEntry entries[] = {
9 /* Translators: "tasklist" is the list of running applications (the
10 * window list) */
11 {"skip-tasklist", 's', 0, G_OPTION_ARG_NONE, &skip_tasklist, "Don't show window in tasklist", NULL((void*)0)},
12 {NULL((void*)0) }
13};
14
15int
16main (int argc, char **argv)
17{
18 GOptionContext *ctxt;
19 VnckScreen *screen;
20 CtkWidget *win;
21 CtkWidget *frame;
22 CtkWidget *selector;
23
24 ctxt = g_option_context_new ("");
25 g_option_context_add_main_entries (ctxt, entries, NULL((void*)0));
26 g_option_context_add_group (ctxt, ctk_get_option_group (TRUE(!(0))));
27 g_option_context_parse (ctxt, &argc, &argv, NULL((void*)0));
28 g_option_context_free (ctxt);
29 ctxt = NULL((void*)0);
30
31 ctk_init (&argc, &argv);
32
33 screen = vnck_screen_get_default ();
34
35 /* because the pager doesn't respond to signals at the moment */
36 vnck_screen_force_update (screen);
37
38 win = ctk_window_new (CTK_WINDOW_TOPLEVEL);
39 ctk_window_set_default_size (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, 200, 32);
40 ctk_window_stick (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
);
41 /* vnck_ctk_window_set_dock_type (CTK_WINDOW (win)); */
42
43 ctk_window_set_title (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, "Window Selector");
44 ctk_window_set_resizable (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, TRUE(!(0)));
45
46 /* quit on window close */
47 g_signal_connect (G_OBJECT (win), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((win)), (((GType) ((20) << (2))))))
))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0
)), ((void*)0), (GConnectFlags) 0)
48 G_CALLBACK (ctk_main_quit),g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((win)), (((GType) ((20) << (2))))))
))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0
)), ((void*)0), (GConnectFlags) 0)
49 NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((win)), (((GType) ((20) << (2))))))
))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0
)), ((void*)0), (GConnectFlags) 0)
;
50
51 selector = vnck_selector_new ();
52
53 frame = ctk_frame_new (NULL((void*)0));
54 ctk_frame_set_shadow_type (CTK_FRAME (frame)((((CtkFrame*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((frame)), ((ctk_frame_get_type ()))))))
, CTK_SHADOW_IN);
55 ctk_container_add (CTK_CONTAINER (win)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_container_get_type ()))))))
, frame);
56
57 ctk_container_add (CTK_CONTAINER (frame)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((frame)), ((ctk_container_get_type ()))))))
, selector);
58
59 ctk_widget_show (selector);
60 ctk_widget_show (frame);
61
62 ctk_window_move (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, 0, 0);
63
64 if (skip_tasklist)
65 {
66 ctk_window_set_skip_taskbar_hint (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, TRUE(!(0)));
This statement is never executed
67 ctk_window_set_keep_above (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((win)), ((ctk_window_get_type ()))))))
, TRUE(!(0)));
68 }
69
70 ctk_widget_show (win);
71
72 ctk_main ();
73
74 return 0;
75}