From: JucaBlues Date: Sun, 22 Jun 2008 23:12:31 +0000 (+0000) Subject: warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ad27c35d066af0dd25d482ba99f0d382e57297a7;p=inkscape.git warning cleanup --- diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 98846b77f..760ee87b6 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -228,6 +228,9 @@ style_name_compare(char const *aa, char const *bb) return strcasecmp(a, b); } +/* + defined but not used: + static int style_record_compare(void const *aa, void const *bb) { @@ -252,6 +255,7 @@ static void font_factory_style_list_destructor(NRStyleList *list) } if ( list->records ) g_free(list->records); } +*/ /** * On Win32 performs a stricmp(a,b), otherwise does a strcasecmp(a,b) diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 228a34f83..840cff4a1 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -261,53 +261,53 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int } else if ( strcmp(key,"style") == 0 ) { PangoStyle v=pango_font_description_get_style(descr); if ( v == PANGO_STYLE_ITALIC ) { - res="italic"; + res=(char*)"italic"; } else if ( v == PANGO_STYLE_OBLIQUE ) { - res="oblique"; + res=(char*)"oblique"; } else { - res="normal"; + res=(char*)"normal"; } free_res=false; } else if ( strcmp(key,"weight") == 0 ) { PangoWeight v=pango_font_description_get_weight(descr); if ( v <= PANGO_WEIGHT_ULTRALIGHT ) { - res="200"; + res=(char*)"200"; } else if ( v <= PANGO_WEIGHT_LIGHT ) { - res="300"; + res=(char*)"300"; } else if ( v <= PANGO_WEIGHT_NORMAL ) { - res="normal"; + res=(char*)"normal"; } else if ( v <= PANGO_WEIGHT_BOLD ) { - res="bold"; + res=(char*)"bold"; } else if ( v <= PANGO_WEIGHT_ULTRABOLD ) { - res="800"; + res=(char*)"800"; } else { // HEAVY - res="900"; + res=(char*)"900"; } free_res=false; } else if ( strcmp(key,"stretch") == 0 ) { PangoStretch v=pango_font_description_get_stretch(descr); if ( v <= PANGO_STRETCH_EXTRA_CONDENSED ) { - res="extra-condensed"; + res=(char*)"extra-condensed"; } else if ( v <= PANGO_STRETCH_CONDENSED ) { - res="condensed"; + res=(char*)"condensed"; } else if ( v <= PANGO_STRETCH_SEMI_CONDENSED ) { - res="semi-condensed"; + res=(char*)"semi-condensed"; } else if ( v <= PANGO_STRETCH_NORMAL ) { - res="normal"; + res=(char*)"normal"; } else if ( v <= PANGO_STRETCH_SEMI_EXPANDED ) { - res="semi-expanded"; + res=(char*)"semi-expanded"; } else if ( v <= PANGO_STRETCH_EXPANDED ) { - res="expanded"; + res=(char*)"expanded"; } else { - res="extra-expanded"; + res=(char*)"extra-expanded"; } free_res=false; } else if ( strcmp(key,"variant") == 0 ) { PangoVariant v=pango_font_description_get_variant(descr); if ( v == PANGO_VARIANT_SMALL_CAPS ) { - res="small-caps"; + res=(char*)"small-caps"; } else { - res="normal"; + res=(char*)"normal"; } free_res=false; } else {