Fix building in C99 mode
This commit is contained in:
parent
f82ec71f27
commit
ba5cd75e1f
|
@ -0,0 +1,172 @@
|
|||
commit f42cb2b5dbc58c4af053b71a35629f9d7e6f612b
|
||||
Author: Peter Moser <p.moser@noi.bz.it>
|
||||
Date: Thu Sep 5 14:04:41 2019 +0200
|
||||
|
||||
Fix compile warnings (#317)
|
||||
|
||||
diff --git a/backend/dvi/mdvi-lib/bitmap.c b/backend/dvi/mdvi-lib/bitmap.c
|
||||
index 4417a75..1d83b89 100644
|
||||
--- a/backend/dvi/mdvi-lib/bitmap.c
|
||||
+++ b/backend/dvi/mdvi-lib/bitmap.c
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "mdvi.h"
|
||||
#include "color.h"
|
||||
diff --git a/backend/dvi/mdvi-lib/common.h b/backend/dvi/mdvi-lib/common.h
|
||||
index 30eaa79..b95af67 100644
|
||||
--- a/backend/dvi/mdvi-lib/common.h
|
||||
+++ b/backend/dvi/mdvi-lib/common.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <math.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "sysdeps.h"
|
||||
|
||||
diff --git a/backend/dvi/mdvi-lib/files.c b/backend/dvi/mdvi-lib/files.c
|
||||
index b706506..0a0a9a8 100644
|
||||
--- a/backend/dvi/mdvi-lib/files.c
|
||||
+++ b/backend/dvi/mdvi-lib/files.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
+#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "common.h"
|
||||
diff --git a/backend/dvi/mdvi-lib/font.c b/backend/dvi/mdvi-lib/font.c
|
||||
index 2f655df..df06b5d 100644
|
||||
--- a/backend/dvi/mdvi-lib/font.c
|
||||
+++ b/backend/dvi/mdvi-lib/font.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "mdvi.h"
|
||||
#include "private.h"
|
||||
diff --git a/backend/dvi/mdvi-lib/fontmap.c b/backend/dvi/mdvi-lib/fontmap.c
|
||||
index 1110168..41aabc5 100644
|
||||
--- a/backend/dvi/mdvi-lib/fontmap.c
|
||||
+++ b/backend/dvi/mdvi-lib/fontmap.c
|
||||
@@ -706,7 +706,7 @@ static int mdvi_init_fontmaps(void)
|
||||
FILE *in;
|
||||
Dstring input;
|
||||
int count = 0;
|
||||
- char *config;
|
||||
+ const char *config;
|
||||
|
||||
if(fontmaps_loaded)
|
||||
return 0;
|
||||
diff --git a/backend/dvi/mdvi-lib/hash.c b/backend/dvi/mdvi-lib/hash.c
|
||||
index d359e3c..5dcd35d 100644
|
||||
--- a/backend/dvi/mdvi-lib/hash.c
|
||||
+++ b/backend/dvi/mdvi-lib/hash.c
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
+#include <string.h>
|
||||
#include "mdvi.h"
|
||||
|
||||
/* simple hash tables for MDVI */
|
||||
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c
|
||||
index fa53527..85845d6 100644
|
||||
--- a/backend/epub/epub-document.c
|
||||
+++ b/backend/epub/epub-document.c
|
||||
@@ -352,7 +352,7 @@ epub_document_save (EvDocument *document,
|
||||
{
|
||||
EpubDocument *epub_document = EPUB_DOCUMENT (document);
|
||||
|
||||
- gchar *source_uri = g_filename_to_uri (epub_document->archivename, NULL, &error);
|
||||
+ gchar *source_uri = g_filename_to_uri (epub_document->archivename, NULL, error);
|
||||
if (source_uri == NULL)
|
||||
return FALSE;
|
||||
|
||||
@@ -1503,12 +1503,6 @@ add_night_sheet(contentListNode *listdata,gchar *sheet)
|
||||
open_xml_document(listdata->value);
|
||||
|
||||
set_xml_root_node(NULL);
|
||||
- xmlNodePtr head = xml_get_pointer_to_node((xmlChar*)"head",NULL,NULL);
|
||||
-
|
||||
- xmlNodePtr link = xmlNewTextChild(head,NULL,(xmlChar*)"link",NULL);
|
||||
- xmlAttrPtr href = xmlNewProp(link,(xmlChar*)"href",(xmlChar*)sheeturi);
|
||||
- xmlAttrPtr rel = xmlNewProp(link,(xmlChar*)"rel",(xmlChar*)"alternate stylesheet");
|
||||
- xmlAttrPtr class = xmlNewProp(link,(xmlChar*)"class",(xmlChar*)"night");
|
||||
|
||||
xmlSaveFormatFile (listdata->value, xmldocument, 0);
|
||||
xml_free_doc();
|
||||
@@ -1656,7 +1650,6 @@ static void
|
||||
epub_document_add_mathJax(gchar* containeruri,gchar* documentdir)
|
||||
{
|
||||
gchar *containerfilename= g_filename_from_uri(containeruri,NULL,NULL);
|
||||
- const gchar *backenddir = ev_backends_manager_get_backends_dir();
|
||||
GString *mathjaxdir = g_string_new(MATHJAX_DIRECTORY);
|
||||
|
||||
gchar *mathjaxref = g_filename_to_uri(mathjaxdir->str,NULL,NULL);
|
||||
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
|
||||
index 1922666..4e5e1f3 100644
|
||||
--- a/shell/eggfindbar.c
|
||||
+++ b/shell/eggfindbar.c
|
||||
@@ -287,7 +287,6 @@ egg_find_bar_init (EggFindBar *find_bar)
|
||||
{
|
||||
EggFindBarPrivate *priv;
|
||||
GtkWidget *label;
|
||||
- GtkWidget *alignment;
|
||||
GtkWidget *box;
|
||||
GtkToolItem *item;
|
||||
GtkWidget *arrow;
|
||||
diff --git a/shell/ev-preferences-dialog.c b/shell/ev-preferences-dialog.c
|
||||
index 5f99b4a..fc04a38 100644
|
||||
--- a/shell/ev-preferences-dialog.c
|
||||
+++ b/shell/ev-preferences-dialog.c
|
||||
@@ -90,7 +90,7 @@ help_button_clicked(GtkButton *button,
|
||||
gpointer data)
|
||||
{
|
||||
EvPreferencesDialog *dlg = EV_PREFERENCES_DIALOG(data);
|
||||
- ev_window_show_help(GTK_WINDOW(dlg), NULL);
|
||||
+ ev_window_show_help(EV_WINDOW(dlg), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
diff --git a/shell/ev-properties-view.c b/shell/ev-properties-view.c
|
||||
index 267ac36..7bb4692 100644
|
||||
--- a/shell/ev-properties-view.c
|
||||
+++ b/shell/ev-properties-view.c
|
||||
@@ -358,12 +358,12 @@ ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo
|
||||
}
|
||||
if (info->fields_mask & EV_DOCUMENT_INFO_LINEARIZED)
|
||||
{
|
||||
- /* nice hack bro */
|
||||
- if (info->linearized == 1)
|
||||
+ /* Sometimes info->linearized is not a string */
|
||||
+ if (info->linearized == (char *)1)
|
||||
{
|
||||
set_property (properties, GTK_TABLE (table), LINEARIZED_PROPERTY, _("Yes"), &row);
|
||||
}
|
||||
- else if (info->linearized == 0)
|
||||
+ else if (info->linearized == (char *)0)
|
||||
{
|
||||
set_property (properties, GTK_TABLE (table), LINEARIZED_PROPERTY, _("No"), &row);
|
||||
}
|
||||
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
|
||||
index 7c4fd04..937ae99 100644
|
||||
--- a/shell/ev-window-title.c
|
||||
+++ b/shell/ev-window-title.c
|
||||
@@ -176,6 +176,9 @@ ev_window_title_update (EvWindowTitle *window_title)
|
||||
gtk_window_set_title (window, password_title);
|
||||
g_free (password_title);
|
||||
break;
|
||||
+ case EV_WINDOW_TITLE_RECENT:
|
||||
+ /*Nothing to do; keep compiler quiet */
|
||||
+ break;
|
||||
}
|
||||
|
||||
g_free (title);
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
Name: xreader
|
||||
Version: 2.2.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Simple document viewer
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://github.com/linuxmint/%{name}
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch1: xreader-c99.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
|
@ -133,6 +134,9 @@ This package contains the documentation files for %{name}.
|
|||
%doc %{_datadir}/doc/%{name}*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 10 2019 Florian Weimer <fweimer@redhat.com> - 2.2.3-2
|
||||
- Fix building in C99 mode
|
||||
|
||||
* Wed Jul 31 2019 Leigh Scott <leigh123linux@googlemail.com> - 2.2.3-1
|
||||
- Update to 2.2.3 release
|
||||
|
||||
|
|
Loading…
Reference in New Issue