diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2014-03-31 10:06:05 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2014-03-31 10:06:05 +0000 |
commit | 2cc9ca4c5e2c5c65764ff43beb1f21f93ca3aac8 (patch) | |
tree | 2d13f899e1da5fb939bbeccff1d411abccaa689c /src/lib | |
parent | c8b93e57d2392b50eafdf120198997b870e0deb4 (diff) |
VS2013 x64 is little bit more anal about signed/unsigned comparison (nw)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/formats/ap_dsk35.c | 3 | ||||
-rw-r--r-- | src/lib/formats/cassimg.c | 4 | ||||
-rw-r--r-- | src/lib/formats/flopimg.c | 2 | ||||
-rw-r--r-- | src/lib/formats/thom_cas.c | 4 | ||||
-rw-r--r-- | src/lib/formats/thom_dsk.c | 4 | ||||
-rw-r--r-- | src/lib/formats/ti99_dsk.c | 5 | ||||
-rw-r--r-- | src/lib/util/chdcd.c | 2 | ||||
-rw-r--r-- | src/lib/util/opresolv.c | 6 | ||||
-rw-r--r-- | src/lib/util/un7z.c | 2 | ||||
-rw-r--r-- | src/lib/util/unicode.c | 2 | ||||
-rw-r--r-- | src/lib/util/zippath.c | 2 |
11 files changed, 19 insertions, 17 deletions
diff --git a/src/lib/formats/ap_dsk35.c b/src/lib/formats/ap_dsk35.c index c286fa55f21..9ef82061119 100644 --- a/src/lib/formats/ap_dsk35.c +++ b/src/lib/formats/ap_dsk35.c @@ -664,7 +664,8 @@ static floperr_t apple35_write_track(floppy_image_legacy *floppy, int head, int { floperr_t err; size_t pos = 0; - int sector_count, sector, i, j; + int sector_count, sector, i; + size_t j; struct apple35_tag *tag; UINT8 sum, format_byte, val, side; UINT32 found_sectors = 0; diff --git a/src/lib/formats/cassimg.c b/src/lib/formats/cassimg.c index b7f1ea68ccd..6b94394ed91 100644 --- a/src/lib/formats/cassimg.c +++ b/src/lib/formats/cassimg.c @@ -377,7 +377,7 @@ static casserr_t lookup_sample(cassette_image *cassette, int channel, size_t sam size_t sample_index = sample % SAMPLES_PER_BLOCK; /* is this block beyond the edge of our waveform? */ - if (sample_blocknum >= cassette->blocks.count()) + if (sample_blocknum >= (size_t)cassette->blocks.count()) cassette->blocks.resize_keep_and_clear_new(sample_blocknum + 1); if (cassette->blocks[sample_blocknum] == NULL) @@ -386,7 +386,7 @@ static casserr_t lookup_sample(cassette_image *cassette, int channel, size_t sam sample_block &block = *cassette->blocks[sample_blocknum]; /* is this sample access off the current block? */ - if (sample_index >= block.count()) + if (sample_index >= (size_t)block.count()) block.resize_keep_and_clear_new(SAMPLES_PER_BLOCK); *ptr = &block[sample_index]; diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index ca9af339518..db96124a745 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -114,7 +114,7 @@ static floperr_t floppy_open_internal(void *fp, const struct io_procs *procs, co } /* vote on the best format */ - for (i = 0; (i < max_options) && floppy_options[i].construct; i++) + for (i = 0; (i < (size_t)max_options) && floppy_options[i].construct; i++) { if (!extension || !floppy_options[i].extensions || image_find_extension(floppy_options[i].extensions, extension)) { diff --git a/src/lib/formats/thom_cas.c b/src/lib/formats/thom_cas.c index 301b3de7d10..02e5821b82b 100644 --- a/src/lib/formats/thom_cas.c +++ b/src/lib/formats/thom_cas.c @@ -202,7 +202,7 @@ static casserr_t to7_k7_load( cassette_image *cass ) cassette_image_read( cass, block, 0, 64 ); for ( i = 3; ; i++ ) { - if ( ( i >= size ) || ( i >= 64 ) ) + if ( ( (size_t)i >= size ) || ( i >= 64 ) ) { /* ? */ PRINT (( "to7_k7_load: WARNING: this does not look like a MO or TO cassette.\n" )); @@ -534,7 +534,7 @@ static casserr_t mo5_k5_load( cassette_image *cass ) cassette_image_read( cass, block, 0, 64 ); for ( i = 3; ; i++ ) { - if ( ( i >= size ) || ( i >= 64 ) ) + if ( ( (size_t)i >= size ) || ( i >= 64 ) ) { /* ? */ PRINT (( "to5_k5_load: WARNING: this does not look like a MO or TO cassette.\n" )); diff --git a/src/lib/formats/thom_dsk.c b/src/lib/formats/thom_dsk.c index b3cf47234a2..e789f23682f 100644 --- a/src/lib/formats/thom_dsk.c +++ b/src/lib/formats/thom_dsk.c @@ -105,7 +105,7 @@ static floperr_t internal_sap_read_sector(floppy_image_legacy *floppy, int head, { UINT64 offset; floperr_t err; - int i; + size_t i; UINT8 *buf; err = get_offset(floppy, head, track, sector, sector_is_index, &offset); if (err) @@ -127,7 +127,7 @@ static floperr_t internal_sap_write_sector(floppy_image_legacy *floppy, int head floperr_t err; UINT8 buf[256+6]; UINT16 crc; - int i; + size_t i; err = get_offset(floppy, head, track, sector, sector_is_index, &offset); if (err) return err; diff --git a/src/lib/formats/ti99_dsk.c b/src/lib/formats/ti99_dsk.c index b1b8cec589b..23b2c970281 100644 --- a/src/lib/formats/ti99_dsk.c +++ b/src/lib/formats/ti99_dsk.c @@ -1505,7 +1505,7 @@ static floperr_t ti99_sdf_read_track(floppy_image_legacy *floppy, int head, int */ static floperr_t ti99_sdf_write_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, const void *buffer, size_t buflen) { - int current_pos = 0; + size_t current_pos = 0; UINT8 *track_image; int leadin, gap1, gap2; int is_fm, found; @@ -2128,7 +2128,8 @@ static floperr_t ti99_tdf_read_track_internal(floppy_image_legacy *floppy, int h UINT64 track_offset; int first_idam = 0; struct ti99dsk_tag *tag = (ti99dsk_tag*)floppy_tag(floppy); - int i, byte, crc; + size_t i; + int byte, crc; UINT8 *track_data = (UINT8*)buffer; diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c index 9059d65aacb..13176bac554 100644 --- a/src/lib/util/chdcd.c +++ b/src/lib/util/chdcd.c @@ -995,7 +995,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_input_info &outinfo) { FILE *infile; - int i, trknum; + size_t i, trknum; static char token[512]; char tocftemp[512]; diff --git a/src/lib/util/opresolv.c b/src/lib/util/opresolv.c index 4d093a955da..6d011c7adb8 100644 --- a/src/lib/util/opresolv.c +++ b/src/lib/util/opresolv.c @@ -249,7 +249,7 @@ outofmemory: optreserr_t option_resolution_add_param(option_resolution *resolution, const char *param, const char *value) { - int i; + size_t i; int must_resolve; optreserr_t err; const char *option_specification; @@ -344,7 +344,7 @@ void option_resolution_close(option_resolution *resolution) optreserr_t option_resolution_finish(option_resolution *resolution) { - int i; + size_t i; optreserr_t err; struct option_resolution_entry *entry; const char *option_specification; @@ -445,7 +445,7 @@ const option_guide *option_resolution_find_option(option_resolution *resolution, const option_guide *option_resolution_index_option(option_resolution *resolution, int indx) { - if ((indx < 0) || (indx >= resolution->option_count)) + if ((indx < 0) || ((size_t)indx >= resolution->option_count)) return NULL; return resolution->entries[indx].guide_entry; } diff --git a/src/lib/util/un7z.c b/src/lib/util/un7z.c index 149ead60e4d..4dfb4c2d8db 100644 --- a/src/lib/util/un7z.c +++ b/src/lib/util/un7z.c @@ -220,7 +220,7 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search /* Check for a name match */ SzArEx_GetFileNameUtf16(&new_7z->db, i, temp); - if (len == search_filename_length+1) + if (len == (size_t)search_filename_length+1) { int j; for (j=0;j<search_filename_length;j++) diff --git a/src/lib/util/unicode.c b/src/lib/util/unicode.c index c87965415d7..8ffae847141 100644 --- a/src/lib/util/unicode.c +++ b/src/lib/util/unicode.c @@ -30,7 +30,7 @@ int uchar_isvalid(unicode_char uchar) int uchar_from_utf8(unicode_char *uchar, const char *utf8char, size_t count) { unicode_char c, minchar; - int auxlen, i; + size_t auxlen, i; char auxchar; /* validate parameters */ diff --git a/src/lib/util/zippath.c b/src/lib/util/zippath.c index 69eea2fa20b..3edd688f791 100644 --- a/src/lib/util/zippath.c +++ b/src/lib/util/zippath.c @@ -697,7 +697,7 @@ void zippath_closedir(zippath_directory *directory) static const char *get_relative_path(zippath_directory *directory, const zip_file_header *header) { const char *result = NULL; - int len = directory->zipprefix.len(); + size_t len = directory->zipprefix.len(); if ((len <= strlen(header->filename)) && !strncmp(directory->zipprefix, header->filename, len)) |