Bug Summary

File:capplet/main.c
Warning:line 86, column 3
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 main.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/capplet -fcoverage-compilation-dir=/rootdir/capplet -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I .. -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/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -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 ../cafe-session -D LOCALE_DIR="/usr/share/locale" -D CTKBUILDER_DIR="/usr/share/cafe-session-manager" -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 -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -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-01-23-165114-18293-1 -x c main.c
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 * main.c
3 * Copyright (C) 1999 Free Software Foundation, Inc.
4 * Copyright (C) 2008 Lucas Rocha.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301, USA.
20 */
21
22#include <config.h>
23
24#include <unistd.h>
25#include <stdlib.h>
26
27#include <glib/gi18n.h>
28#include <ctk/ctk.h>
29
30#include "csm-properties-dialog.h"
31
32static gboolean show_version = FALSE(0);
33
34static GOptionEntry options[] = {
35 {"version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application")("Version of this application"), NULL((void*)0)},
36 {NULL((void*)0), 0, 0, 0, NULL((void*)0), NULL((void*)0), NULL((void*)0)}
37};
38
39static void dialog_response(CsmPropertiesDialog* dialog, guint response_id, gpointer data)
40{
41 GError* error;
42
43 if (response_id == CTK_RESPONSE_HELP)
44 {
45 error = NULL((void*)0);
46 ctk_show_uri_on_window (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, "help:cafe-user-guide/gosstartsession-2",
47 ctk_get_current_event_time (), &error);
48
49 if (error != NULL((void*)0))
50 {
51 CtkWidget* d = ctk_message_dialog_new(CTK_WINDOW(dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, CTK_DIALOG_MODAL | CTK_DIALOG_DESTROY_WITH_PARENT, CTK_MESSAGE_ERROR, CTK_BUTTONS_CLOSE, "%s", _("Could not display help document")gettext ("Could not display help document"));
52 ctk_message_dialog_format_secondary_text(CTK_MESSAGE_DIALOG(d)((((CtkMessageDialog*) (void *) g_type_check_instance_cast ((
GTypeInstance*) ((d)), ((ctk_message_dialog_get_type ()))))))
, "%s", error->message);
53 g_error_free(error);
54
55 ctk_dialog_run(CTK_DIALOG (d)((((CtkDialog*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((d)), ((ctk_dialog_get_type ()))))))
);
56 ctk_widget_destroy(d);
57 }
58 }
59 else
60 {
61 ctk_widget_destroy(CTK_WIDGET (dialog)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_widget_get_type ()))))))
);
62 ctk_main_quit();
63 }
64}
65
66int main(int argc, char* argv[])
67{
68 GError* error;
69 CtkWidget* dialog;
70
71 bindtextdomain(GETTEXT_PACKAGE"cafe-session-manager", LOCALE_DIR"/usr/share/locale");
72 bind_textdomain_codeset(GETTEXT_PACKAGE"cafe-session-manager", "UTF-8");
73 textdomain(GETTEXT_PACKAGE"cafe-session-manager");
74
75 error = NULL((void*)0);
76
77 if (!ctk_init_with_args(&argc, &argv, " - CAFE Session Properties", options, GETTEXT_PACKAGE"cafe-session-manager", &error))
78 {
79 g_warning("Unable to start: %s", error->message);
80 g_error_free(error);
81 return 1;
82 }
83
84 if (show_version)
85 {
86 g_print("%s %s\n", argv[0], VERSION"1.25.0");
This statement is never executed
87 return 0;
88 }
89
90 dialog = csm_properties_dialog_new();
91 g_signal_connect(dialog, "response", G_CALLBACK(dialog_response), NULL)g_signal_connect_data ((dialog), ("response"), (((GCallback) (
dialog_response))), (((void*)0)), ((void*)0), (GConnectFlags)
0)
;
92 ctk_widget_show(dialog);
93
94 ctk_main();
95
96 return 0;
97}