[Users] [Bug 4737] New: fancy: correct type of cur_link
noreply at thewildbeast.co.uk
noreply at thewildbeast.co.uk
Fri Jan 12 16:42:53 UTC 2024
https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4737
Bug ID: 4737
Summary: fancy: correct type of cur_link
Product: Claws Mail (GTK 2)
Version: GIT
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P3
Component: Plugins/Fancy
Assignee: users at lists.claws-mail.org
Reporter: olaf at aepfle.de
Created attachment 2401
-->
https://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=2401&action=edit
gtk2-fancy-correct-type-of-cur_link.patch
The value assigned to cur_link is of type gchar *. The consumers of cur_link
may indicate read-only access to the memory by using the const attribute. This
gives the compiler the opportunity to print diagnostics if the called function
modifies the memory anyway.
Remove the const attribute to fix a compiler warning:
fancy_viewer.c: In function ‘context_menu_cb’:
fancy_viewer.c:853:11: warning: passing argument 1 of ‘g_free’ discards ‘const’
qualifier from pointer target type [-Wdiscarded-qualifier
s]
g_free(viewer->cur_link);
^~~~~~
In file included from /usr/include/glib-2.0/glib/glist.h:32:0,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from ./fancy_viewer.h:29,
from fancy_viewer.c:28:
/usr/include/glib-2.0/glib/gmem.h:72:7: note: expected ‘gpointer {aka void *}’
but argument is of type ‘const gchar * {aka const char *}’
void g_free (gpointer mem);
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Users
mailing list