Author: tom
Date: Wed Dec 17 09:41:05 2008
New Revision: 3549
URL: http://svn.slimdevices.com?rev=3549&root=Jive&view=rev
Log:
pango:
Fixed the compiler warnings, switching back to -Werror
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/configure
7.4/branches/pango/squeezeplay/src/squeezeplay/configure.in
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive.h
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_font.c
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_label.c
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/configure
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/configure?rev=3549&root=Jive&r1=3548&r2=3549&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/configure (original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/configure Wed Dec 17
09:41:05 2008
@@ -22186,9 +22186,7 @@
if test x"$GCC" = x"yes"
then
-# CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
-# commented out Werror until gutil.h warning is resolved
- CFLAGS="$CFLAGS -Wall -Wextra -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
+CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
fi
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/configure.in
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/configure.in?rev=3549&root=Jive&r1=3548&r2=3549&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/configure.in (original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/configure.in Wed Dec 17
09:41:05 2008
@@ -129,9 +129,7 @@
dnl Be pedantic when compiling
if test x"$GCC" = x"yes"
then
-# CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
-# commented out Werror until gutil.h warning is resolved
- CFLAGS="$CFLAGS -Wall -Wextra -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
+CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wdeclaration-after-statement
-Wpointer-arith -Wcast-align -Wno-unused-parameter"
fi
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive.h
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive.h?rev=3549&root=Jive&r1=3548&r2=3549&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive.h (original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive.h Wed Dec 17
09:41:05 2008
@@ -10,6 +10,7 @@
#include "common.h"
+#include <pango/pango.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <SDL_gfxPrimitives.h>
@@ -23,8 +24,13 @@
/* print profile information for blit's */
#undef JIVE_PROFILE_BLIT
+#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+
+#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
#define JIVE_COLOR_WHITE 0xFFFFFFFF
#define JIVE_COLOR_BLACK 0x000000FF
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_font.c
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_font.c?rev=3549&root=Jive&r1=3548&r2=3549&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_font.c (original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_font.c Wed Dec
17 09:41:05 2008
@@ -7,7 +7,6 @@
#include "common.h"
#include "jive.h"
-#include <pango/pango.h>
static const char *JIVE_FONT_MAGIC = "Font";
@@ -254,18 +253,20 @@
}
/**
- * if wrapping_width == -1, no wrapping will be done
+ * if wrapping_width == 0, no wrapping will be done
*/
JiveSurface *jive_font_draw_text_wrap(JiveFont *font, Uint32 color, const char
*str, Uint16 wrapping_width ) {
JiveSurface *jive_surface;
PangoAttrList *attr_list;
- PangoAttribute *size, *fgcolor, *family, *weight, *letter_spacing;
+ PangoAttribute *size, *fgcolor, *family, *weight;
+ //PangoAttribute *letter_spacing;
GError *err = NULL;
char *text = NULL;
+ PangoLayout *layout;
assert(font && font->magic == JIVE_FONT_MAGIC);
- PangoLayout *layout = SDLPango_GetPangoLayout(pangocontext);
+ layout = SDLPango_GetPangoLayout(pangocontext);
if ( !pango_parse_markup(str, -1, 0, &attr_list, &text, NULL, &err)) {
fprintf(stderr, "pango_parse_markup error: %s\n", err->message);
@@ -313,7 +314,7 @@
g_free (text);
- if (wrapping_width == -1) {
+ if (wrapping_width == 0) {
//don't wrap
pango_layout_set_width(layout, (guint) -1);
} else {
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_label.c
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_label.c?rev=3549&root=Jive&r1=3548&r2=3549&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_label.c
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_label.c Wed Dec
17 09:41:05 2008
@@ -93,12 +93,9 @@
static void prepare(lua_State *L) {
LabelWidget *peer;
- Uint16 width, height, offset;
+ Uint16 width, height;
const char *str;
- JiveFont *font;
- Uint32 fg, sh;
- bool is_sh;
peer = jive_getpeer(L, 1, &labelPeerMeta);
@@ -138,7 +135,6 @@
int jiveL_label_layout(lua_State *L) {
LabelWidget *peer;
Uint16 y;
- size_t i;
Uint16 w, h;
/* stack is:
@@ -243,7 +239,6 @@
int jiveL_label_draw(lua_State *L) {
- size_t i;
/* stack is:
* 1: widget
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins