eliminated compiler(gcc4) warnings

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@86 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2005-12-29 16:55:40 +00:00
parent d6c16742b7
commit 6a7e86edf9

View File

@ -207,7 +207,7 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp)
gboolean status;
guchar changed_char = TA_NAME;
if ((NULL == fgets(buf, BUFSIZ, fp)) || ('\0' == *buf))
if ((NULL == fgets((gchar*)buf, BUFSIZ, fp)) || ('\0' == *buf))
return FALSE;
for (start = end = buf, status = TRUE; (TRUE == status); start = end, ++ end)
{
@ -222,32 +222,32 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp)
if (!isprint(*start))
return FALSE;
else
tag->name = g_strdup(start);
tag->name = g_strdup((gchar*)start);
}
else
{
switch (*start)
{
case TA_LINE:
tag->atts.entry.line = atol(start + 1);
tag->atts.entry.line = atol((gchar*)start + 1);
break;
case TA_LOCAL:
tag->atts.entry.local = atoi(start + 1);
tag->atts.entry.local = atoi((gchar*)start + 1);
break;
case TA_TYPE:
tag->type = (TMTagType) atoi(start + 1);
tag->type = (TMTagType) atoi((gchar*)start + 1);
break;
case TA_ARGLIST:
tag->atts.entry.arglist = g_strdup(start + 1);
tag->atts.entry.arglist = g_strdup((gchar*)start + 1);
break;
case TA_SCOPE:
tag->atts.entry.scope = g_strdup(start + 1);
tag->atts.entry.scope = g_strdup((gchar*)start + 1);
break;
case TA_VARTYPE:
tag->atts.entry.var_type = g_strdup(start + 1);
tag->atts.entry.var_type = g_strdup((gchar*)start + 1);
break;
case TA_INHERITS:
tag->atts.entry.inheritance = g_strdup(start + 1);
tag->atts.entry.inheritance = g_strdup((gchar*)start + 1);
break;
case TA_TIME:
if (tm_tag_file_t != tag->type)
@ -256,7 +256,7 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp)
return FALSE;
}
else
tag->atts.file.timestamp = atol(start + 1);
tag->atts.file.timestamp = atol((gchar*)start + 1);
break;
case TA_LANG:
if (tm_tag_file_t != tag->type)
@ -265,7 +265,7 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp)
return FALSE;
}
else
tag->atts.file.lang = atoi(start + 1);
tag->atts.file.lang = atoi((gchar*)start + 1);
break;
case TA_INACTIVE:
if (tm_tag_file_t != tag->type)
@ -274,7 +274,7 @@ gboolean tm_tag_init_from_file(TMTag *tag, TMSourceFile *file, FILE *fp)
return FALSE;
}
else
tag->atts.file.inactive = (gboolean) atoi(start + 1);
tag->atts.file.inactive = (gboolean) atoi((gchar*)start + 1);
break;
case TA_ACCESS:
tag->atts.entry.access = *(start + 1);
@ -373,7 +373,7 @@ void tm_tag_free(gpointer tag)
int tm_tag_compare(const void *ptr1, const void *ptr2)
{
int *sort_attr;
unsigned int *sort_attr;
int returnval = 0;
TMTag *t1 = *((TMTag **) ptr1);
TMTag *t2 = *((TMTag **) ptr2);