Revision: 1996 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1996&view=re... Author: frlan Date: 2011-03-17 21:49:25 +0000 (Thu, 17 Mar 2011)
Log Message: ----------- GeanyLaTeX: Try to fix some compiler warnings. Patch ported from Geany-Plugins.
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/datatypes.h trunk/geanylatex/src/formatpatterns.c trunk/geanylatex/src/formatutils.h trunk/geanylatex/src/latexencodings.h trunk/geanylatex/src/latexenvironments.c trunk/geanylatex/src/templates.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/ChangeLog 2011-03-17 21:49:25 UTC (rev 1996) @@ -1,3 +1,8 @@ +2011-03-17 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Try to fix some compiler warnings. Patch ported from Geany-Plugins. + + 2011-03-13 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Resorting alignment buttons inside LaTeX-toolbar.
Modified: trunk/geanylatex/src/datatypes.h =================================================================== --- trunk/geanylatex/src/datatypes.h 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/datatypes.h 2011-03-17 21:49:25 UTC (rev 1996) @@ -33,7 +33,7 @@ typedef struct { gint cat; - gchar *label; + const gchar *label; gboolean sorted; } CategoryName;
@@ -41,7 +41,7 @@ typedef struct { gchar *filepath; - gchar *label; + const gchar *label; GString *template; } TemplateEntry;
@@ -65,15 +65,15 @@
typedef struct { - gchar *latex; - gchar *label; + const gchar *latex; + const gchar *label; } BibTeXType;
typedef struct { - gchar *label_name; + const gchar *label_name; gint page; - gchar *chapter; + const gchar *chapter; } LaTeXLabel;
#endif
Modified: trunk/geanylatex/src/formatpatterns.c =================================================================== --- trunk/geanylatex/src/formatpatterns.c 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/formatpatterns.c 2011-03-17 21:49:25 UTC (rev 1996) @@ -21,7 +21,7 @@
#include "geanylatex.h"
-gchar* glatex_format_pattern[] = { +const gchar* glatex_format_pattern[] = { "\textit", "\textbf", "\underline", @@ -47,7 +47,7 @@ N_("Right side oriented") };
-gchar *glatex_fontsize_pattern[] = { +const gchar *glatex_fontsize_pattern[] = { "\tiny", "\scriptsize", "\footnotesize",
Modified: trunk/geanylatex/src/formatutils.h =================================================================== --- trunk/geanylatex/src/formatutils.h 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/formatutils.h 2011-03-17 21:49:25 UTC (rev 1996) @@ -58,10 +58,10 @@ LATEX_FONTSIZE_END };
-extern gchar* glatex_format_pattern[]; +extern const gchar* glatex_format_pattern[]; extern const gchar *glatex_format_labels[]; extern const gchar *glatex_fontsize_labels[]; -extern gchar *glatex_fontsize_pattern[]; +extern const gchar *glatex_fontsize_pattern[]; void glatex_insert_latex_format(GtkMenuItem * menuitem, gpointer gdata); void glatex_insert_latex_fontsize(GtkMenuItem * menuitem, gpointer gdata);
Modified: trunk/geanylatex/src/latexencodings.h =================================================================== --- trunk/geanylatex/src/latexencodings.h 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/latexencodings.h 2011-03-17 21:49:25 UTC (rev 1996) @@ -44,8 +44,8 @@ typedef struct { LaTeXEncodingIndex charset; - gchar *name; - gchar *latex; + const gchar *name; + const gchar *latex; gint geany_enc; } LaTeXEncodings;
Modified: trunk/geanylatex/src/latexenvironments.c =================================================================== --- trunk/geanylatex/src/latexenvironments.c 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/latexenvironments.c 2011-03-17 21:49:25 UTC (rev 1996) @@ -51,7 +51,7 @@ {0, NULL, NULL}, };
-gchar *glatex_list_environments [] = +const gchar *glatex_list_environments [] = { "description", "enumerate",
Modified: trunk/geanylatex/src/templates.c =================================================================== --- trunk/geanylatex/src/templates.c 2011-03-17 21:48:56 UTC (rev 1995) +++ trunk/geanylatex/src/templates.c 2011-03-17 21:49:25 UTC (rev 1996) @@ -87,8 +87,6 @@ /* Frees all elelements of struct */ void glatex_free_template_entry(TemplateEntry *template, G_GNUC_UNUSED gpointer *data){ if (template->label != NULL) - g_free(template->label); - if (template->label != NULL) g_free(template->filepath); if (template->label != NULL) g_string_free(template->template, TRUE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.