Skip to content

M!57 - gal-a11y-e-cell-text.c: Replace deprecated G_CONST_RETURN usage

Compiling src/e-util/gal-a11y-e-cell-text.c emits the warning below, that G_CONST_RETURN should be replaced with const.

[1/94] /usr/bin/clang -DEVOLUTION_BINDIR=\"/usr/bin\" -DEVOLUTION_DATADIR=\"/usr/share\" -DEVOLUTION_ECPSDIR=\"/usr/share/evolution/ecps\" -DEVOLUTION_ETSPECDIR=\"/usr/share/evolution/etspec\" -DEVOLUTION_GALVIEWSDIR=\"/usr/share/evolution/views\" -DEVOLUTION_HELPDIR=\"/usr/share/evolution/help\" -DEVOLUTION_ICONDIR=\"/usr/share/evolution/icons\" -DEVOLUTION_IMAGESDIR=\"/usr/share/evolution/images\" -DEVOLUTION_LIBDIR=\"/usr/lib\" -DEVOLUTION_LIBEXECDIR=\"/usr/libexec/evolution\" -DEVOLUTION_LOCALEDIR=\"/usr/share/locale\" -DEVOLUTION_MODULEDIR=\"/usr/lib/evolution/modules\" -DEVOLUTION_PLUGINDIR=\"/usr/lib/evolution/plugins\" -DEVOLUTION_PREFIX=\"/usr\" -DEVOLUTION_PRIVDATADIR=\"/usr/share/evolution\" -DEVOLUTION_RULEDIR=\"/usr/share/evolution\" -DEVOLUTION_SOUNDDIR=\"/usr/share/evolution/sounds\" -DEVOLUTION_SOURCE_WEBKITDATADIR=\"/git/gnome/evolution/data/webkit\" -DEVOLUTION_SYSCONFDIR=\"/usr/etc\" -DEVOLUTION_TESTGIOMODULESDIR=\"/git/gnome/evolution/build-asan/src/e-util\" -DEVOLUTION_TESTTOPSRCDIR=\"/git/gnome/evolution\" -DEVOLUTION_TOOLSDIR=\"/usr/libexec/evolution\" -DEVOLUTION_UIDIR=\"/usr/share/evolution/ui\" -DEVOLUTION_WEBKITDATADIR=\"/usr/share/evolution/webkit\" -DEVOLUTION_WEB_EXTENSIONS_DIR=\"/usr/lib/evolution/web-extensions\" -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22 -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_46 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DG_LOG_DOMAIN=\"evolution-util\" -DLDAP_DEPRECATED -DLIBEUTIL_COMPILATION -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_42 -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_42 -Devolution_util_EXPORTS -I. -Isrc -I../ -I../src -Isrc/e-util -I/usr/include/gnome-autoar-0 -I/usr/include/gtk-3.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/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/enchant -I/usr/include/evolution-data-server -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libsecret-1 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/gail-3.0 -I/usr/include/gcr-3 -I/usr/include/gck-1 -I/usr/include/p11-kit-1 -I/usr/include/gnome-desktop-3.0 -I/usr/include/webkitgtk-4.0 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gspell-1 -I/usr/include/enchant-2 -Isrc/libgnomecanvas -I../src/libgnomecanvas -Wno-format-nonliteral -Wno-parentheses-equality -Wnested-externs -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wno-deprecated-declarations -fno-strict-aliasing -Wwrite-strings -Wredundant-decls -Wpointer-arith -Wmissing-noreturn -Wmissing-declarations -Winit-self -Wformat-security -Wformat -fsanitize=address,undefined  -fno-optimize-sibling-calls -fno-omit-frame-pointer -g -fPIC   -pthread -I/usr/include/gnome-autoar-0 -I/usr/include -I/usr/include/gtk-3.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/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/enchant -I/usr/include/evolution-data-server -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libsecret-1 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/gail-3.0 -I/usr/include/gcr-3 -I/usr/include/gck-1 -I/usr/include/p11-kit-1 -I/usr/include/gnome-desktop-3.0 -I/usr/include/webkitgtk-4.0 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gspell-1 -I/usr/include/enchant-2 -MD -MT src/e-util/CMakeFiles/evolution-util.dir/gal-a11y-e-cell-text.c.o -MF src/e-util/CMakeFiles/evolution-util.dir/gal-a11y-e-cell-text.c.o.d -o src/e-util/CMakeFiles/evolution-util.dir/gal-a11y-e-cell-text.c.o   -c ../src/e-util/gal-a11y-e-cell-text.c
../src/e-util/gal-a11y-e-cell-text.c:100:8: warning: Deprecated pre-processor symbol, replace with const [-W#pragma-messages]
static G_CONST_RETURN gchar *
       ^
/usr/include/glib-2.0/glib/gmacros.h:913:30: note: expanded from macro 'G_CONST_RETURN'
                             ^
/usr/include/glib-2.0/glib/gversionmacros.h:397:49: note: expanded from macro 'GLIB_DEPRECATED_MACRO_IN_2_30_FOR'
                                                ^
/usr/include/glib-2.0/glib/gmacros.h:990:38: note: expanded from macro 'GLIB_DEPRECATED_MACRO_FOR'
                                     ^
/usr/include/glib-2.0/glib/gmacros.h:988:33: note: expanded from macro '_GLIB_GNUC_DO_PRAGMA'
                                ^
<scratch space>:29:6: note: expanded from here
 GCC warning "Deprecated pre-processor symbol, replace with " "const"
     ^
1 warning generated.
Edited by Milan Crha

Merge request reports