Bug Summary

File:cdk/x11/cdkdisplaymanager-x11.c
Warning:line 52, 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 cdkdisplaymanager-x11.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 -fhalf-no-semantic-interposition -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 -fcoverage-compilation-dir=/rootdir/cdk/x11 -resource-dir /usr/lib/llvm-16/lib/clang/16 -D HAVE_CONFIG_H -I . -I ../.. -D G_LOG_DOMAIN="Cdk" -D G_LOG_USE_STRUCTURED=1 -D CDK_COMPILATION -I ../.. -I ../../cdk -I ../../cdk -D G_ENABLE_DEBUG -D G_ENABLE_CONSISTENCY_CHECKS -D GLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_66 -D GLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_66 -I /usr/include/pango-1.0 -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/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 -D PIC -internal-isystem /usr/lib/llvm-16/lib/clang/16/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 -fdebug-compilation-dir=/rootdir/cdk/x11 -ferror-limit 19 -fvisibility=hidden -fgnuc-version=4.2.1 -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.core.SizeofPtr -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/2024-09-19-173409-43638-1 -x c cdkdisplaymanager-x11.c
1/* CDK - The GIMP Drawing Kit
2 * cdkdisplaymanager-x11.c
3 *
4 * Copyright 2010 Red Hat, Inc.
5 *
6 * Author: Matthias clasen
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#include "config.h"
23
24#include "cdkx11displaymanager.h"
25#include "cdkdisplaymanagerprivate.h"
26#include "cdkdisplay-x11.h"
27#include "cdkprivate-x11.h"
28
29#include "cdkinternals.h"
30
31struct _CdkX11DisplayManager
32{
33 CdkDisplayManager parent;
34};
35
36struct _CdkX11DisplayManagerClass
37{
38 CdkDisplayManagerClass parent_class;
39};
40
41G_DEFINE_TYPE (CdkX11DisplayManager, cdk_x11_display_manager, CDK_TYPE_DISPLAY_MANAGER)static void cdk_x11_display_manager_init (CdkX11DisplayManager
*self); static void cdk_x11_display_manager_class_init (CdkX11DisplayManagerClass
*klass); static GType cdk_x11_display_manager_get_type_once (
void); static gpointer cdk_x11_display_manager_parent_class =
((void*)0); static gint CdkX11DisplayManager_private_offset;
static void cdk_x11_display_manager_class_intern_init (gpointer
klass) { cdk_x11_display_manager_parent_class = g_type_class_peek_parent
(klass); if (CdkX11DisplayManager_private_offset != 0) g_type_class_adjust_private_offset
(klass, &CdkX11DisplayManager_private_offset); cdk_x11_display_manager_class_init
((CdkX11DisplayManagerClass*) klass); } __attribute__ ((__unused__
)) static inline gpointer cdk_x11_display_manager_get_instance_private
(CdkX11DisplayManager *self) { return (((gpointer) ((guint8*
) (self) + (glong) (CdkX11DisplayManager_private_offset)))); }
GType cdk_x11_display_manager_get_type (void) { static GType
static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert
(sizeof *(&static_g_define_type_id) == sizeof (gpointer)
, "Expression evaluates to false"); (void) (0 ? (gpointer) * (
&static_g_define_type_id) : ((void*)0)); (!(__extension__
({ _Static_assert (sizeof *(&static_g_define_type_id) ==
sizeof (gpointer), "Expression evaluates to false"); __typeof__
(*(&static_g_define_type_id)) gapg_temp_newval; __typeof__
((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id
); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5)
; gapg_temp_newval; })) && g_once_init_enter_pointer (
&static_g_define_type_id)); })) ) { GType g_define_type_id
= cdk_x11_display_manager_get_type_once (); (__extension__ (
{ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof
(gpointer), "Expression evaluates to false"); 0 ? (void) (*(
&static_g_define_type_id) = (g_define_type_id)) : (void) 0
; g_once_init_leave_pointer ((&static_g_define_type_id), (
gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id
; } __attribute__ ((__noinline__)) static GType cdk_x11_display_manager_get_type_once
(void) { GType g_define_type_id = g_type_register_static_simple
((cdk_display_manager_get_type ()), g_intern_static_string (
"CdkX11DisplayManager"), sizeof (CdkX11DisplayManagerClass), (
GClassInitFunc)(void (*)(void)) cdk_x11_display_manager_class_intern_init
, sizeof (CdkX11DisplayManager), (GInstanceInitFunc)(void (*)
(void)) cdk_x11_display_manager_init, (GTypeFlags) 0); { {{};
} } return g_define_type_id; }
42
43static void
44cdk_x11_display_manager_init (CdkX11DisplayManager *manager G_GNUC_UNUSED__attribute__ ((__unused__)))
45{
46}
47
48static void
49cdk_x11_display_manager_finalize (GObject *object)
50{
51 g_error ("A CdkX11DisplayManager object was finalized. This should not happen");
52 G_OBJECT_CLASS (cdk_x11_display_manager_parent_class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((cdk_x11_display_manager_parent_class)), (((GType) ((20) <<
(2))))))))
->finalize (object);
This statement is never executed
53}
54
55static void
56cdk_x11_display_manager_class_init (CdkX11DisplayManagerClass *class)
57{
58 GObjectClass *object_class = G_OBJECT_CLASS (class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((class)), (((GType) ((20) << (2))))))))
;
59
60 object_class->finalize = cdk_x11_display_manager_finalize;
61}