aboutsummaryrefslogtreecommitdiffhomepage
path: root/xdgmimemagic.cpp
diff options
context:
space:
mode:
authorGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:32:45 -0800
committerGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 22:32:45 -0800
commit9b133a978d5f33985a9b66d3a75165e3d50cdfa3 (patch)
treee846e195756904d8c007ae1f33e77a53d696102c /xdgmimemagic.cpp
parent203c749e6cc2d5ac0e9e8e240c77d94e179c60d0 (diff)
Improve const and signed/unsigned correctness
Diffstat (limited to 'xdgmimemagic.cpp')
-rw-r--r--xdgmimemagic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xdgmimemagic.cpp b/xdgmimemagic.cpp
index 3d2602ed..d6ee9424 100644
--- a/xdgmimemagic.cpp
+++ b/xdgmimemagic.cpp
@@ -315,7 +315,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
int c;
int end_of_file;
int indent = 0;
- int bytes_read;
+ size_t bytes_read;
assert (magic_file != NULL);
@@ -460,7 +460,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_EOF;
}
- if (matchlet->range_length == -1)
+ if (matchlet->range_length == (unsigned int)-1)
{
_xdg_mime_magic_matchlet_free (matchlet);
return XDG_MIME_MAGIC_ERROR;
@@ -474,7 +474,7 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
/* We clean up the matchlet, byte swapping if needed */
if (matchlet->word_size > 1)
{
- int i;
+ size_t i;
if (matchlet->value_length % matchlet->word_size != 0)
{
_xdg_mime_magic_matchlet_free (matchlet);
@@ -519,7 +519,7 @@ _xdg_mime_magic_matchlet_compare_to_data (XdgMimeMagicMatchlet *matchlet,
const void *data,
size_t len)
{
- int i, j;
+ size_t i, j;
for (i = matchlet->offset; i <= matchlet->offset + matchlet->range_length; i++)
{