Fix const correctness
authorRicardo Mones <ricardo@mones.org>
Wed, 21 Aug 2019 09:37:22 +0000 (11:37 +0200)
committerRicardo Mones <ricardo@mones.org>
Wed, 21 Aug 2019 09:37:22 +0000 (11:37 +0200)
Fixes "lh_viewer.c:97:19: warning: initialization discards â€˜const’
qualifier from pointer target type"

src/plugins/litehtml_viewer/lh_viewer.c

index 2d2fc50..03775dc 100644 (file)
@@ -88,13 +88,14 @@ static void lh_show_mimepart(MimeViewer *_viewer, const gchar *infile,
        LHViewer *viewer = (LHViewer *)_viewer;
        gchar *string = procmime_get_part_as_string(partinfo, TRUE);
        gchar *utf8 = NULL;
+       const gchar *charset;
 
        if (string == NULL) {
                g_warning("LH: couldn't get MIME part file\n");
                return;
        }
 
-       gchar *charset = procmime_mimeinfo_get_parameter(partinfo, "charset");
+       charset = procmime_mimeinfo_get_parameter(partinfo, "charset");
        if (charset != NULL && g_ascii_strcasecmp("utf-8", charset) != 0) {
                gsize length;
                GError *error = NULL;