[goffice] Fixed warnings when built without libspectre.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fixed warnings when built without libspectre.
- Date: Fri, 4 Nov 2011 20:15:33 +0000 (UTC)
commit 47667d17d99b6f8c894b2fd6d8cc29433ec49aa3
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri Nov 4 21:14:40 2011 +0100
Fixed warnings when built without libspectre.
goffice/utils/go-spectre.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/goffice/utils/go-spectre.c b/goffice/utils/go-spectre.c
index 61ce5c1..bad2d83 100644
--- a/goffice/utils/go-spectre.c
+++ b/goffice/utils/go-spectre.c
@@ -64,9 +64,11 @@ static void
go_spectre_load_data (GOImage *image, GsfXMLIn *xin)
{
GOSpectre *spectre = GO_SPECTRE (image);
+#ifdef GOFFICE_WITH_EPS
int width, height;
char *tmpname;
int f;
+#endif
spectre->data_length = gsf_base64_decode_simple (xin->content->str, strlen(xin->content->str));
image->data = g_malloc (spectre->data_length);
@@ -120,8 +122,8 @@ go_spectre_build_surface (GOSpectre *spectre)
static void
go_spectre_draw (GOImage *image, cairo_t *cr)
{
- GOSpectre *spectre = GO_SPECTRE (image);
#ifdef GOFFICE_WITH_EPS
+ GOSpectre *spectre = GO_SPECTRE (image);
if (spectre->surface == NULL)
go_spectre_build_surface (spectre);
cairo_save (cr);
@@ -135,9 +137,9 @@ go_spectre_draw (GOImage *image, cairo_t *cr)
static GdkPixbuf *
go_spectre_get_pixbuf (GOImage *image)
{
- GOSpectre *spectre = GO_SPECTRE (image);
GdkPixbuf *res = NULL;
#ifdef GOFFICE_WITH_EPS
+ GOSpectre *spectre = GO_SPECTRE (image);
cairo_surface_t *surface;
cairo_t *cr;
g_return_val_if_fail (spectre != NULL, NULL);
@@ -160,9 +162,10 @@ go_spectre_get_pixbuf (GOImage *image)
static GdkPixbuf *
go_spectre_get_scaled_pixbuf (GOImage *image, int width, int height)
-{ GOSpectre *spectre = GO_SPECTRE (image);
+{
GdkPixbuf *res = NULL;
#ifdef GOFFICE_WITH_EPS
+ GOSpectre *spectre = GO_SPECTRE (image);
cairo_surface_t *surface;
cairo_t *cr;
g_return_val_if_fail (spectre != NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]