Index: src/saveload.cpp =================================================================== --- src/saveload.cpp (Revision 13016) +++ src/saveload.cpp (Arbeitskopie) @@ -531,7 +531,7 @@ static inline size_t SlCalcNetStringLen(const char *ptr, size_t length) { if (ptr == NULL) return 0; - return minu(strlen(ptr), length - 1); + return min(strlen(ptr), length - 1); } /** Calculate the gross length of the string that it @@ -911,7 +911,7 @@ static void SlLoadChunk(const ChunkHandler *ch) { byte m = SlReadByte(); - size_t len; + uint32 len; uint32 endoffs; _sl.block_mode = m; @@ -1206,7 +1206,7 @@ do { /* read more bytes from the file?*/ if (_z.avail_in == 0) { - _z.avail_in = fread(_z.next_in = _sl.buf + 4096, 1, 4096, _sl.fh); + _z.avail_in = (uInt)fread(_z.next_in = _sl.buf + 4096, 1, 4096, _sl.fh); } /* inflate the data */ Index: src/build_vehicle_gui.cpp =================================================================== --- src/build_vehicle_gui.cpp (Revision 13016) +++ src/build_vehicle_gui.cpp (Arbeitskopie) @@ -1034,7 +1034,7 @@ case BUILD_VEHICLE_WIDGET_LIST: { uint i = (e->we.click.pt.y - w->widget[BUILD_VEHICLE_WIDGET_LIST].top) / GetVehicleListHeight(bv->vehicle_type) + w->vscroll.pos; - uint num_items = bv->eng_list.size(); + size_t num_items = bv->eng_list.size(); bv->sel_engine = (i < num_items) ? bv->eng_list[i] : INVALID_ENGINE; w->SetDirty(); break; Index: src/autoreplace_gui.cpp =================================================================== --- src/autoreplace_gui.cpp (Revision 13016) +++ src/autoreplace_gui.cpp (Arbeitskopie) @@ -411,7 +411,7 @@ uint16 click_scroll_pos = e->we.click.widget == RVW_WIDGET_LEFT_MATRIX ? w->vscroll.pos : w->vscroll2.pos; uint16 click_scroll_cap = e->we.click.widget == RVW_WIDGET_LEFT_MATRIX ? w->vscroll.cap : w->vscroll2.cap; byte click_side = e->we.click.widget == RVW_WIDGET_LEFT_MATRIX ? 0 : 1; - uint16 engine_count = WP(w, replaceveh_d).list[click_side].size(); + size_t engine_count = WP(w, replaceveh_d).list[click_side].size(); if (i < click_scroll_cap) { i += click_scroll_pos; Index: src/win32.cpp =================================================================== --- src/win32.cpp (Revision 13016) +++ src/win32.cpp (Arbeitskopie) @@ -1090,7 +1090,7 @@ const char *ptr; WChar c; - uint16 width, length; + size_t width, length; if (IsClipboardFormatAvailable(CF_UNICODETEXT)) { OpenClipboard(NULL); @@ -1123,7 +1123,7 @@ if (!IsPrintable(c)) break; size_t len = Utf8CharLen(c); - if (tb->length + length >= tb->maxlength - (uint16)len) break; + if (tb->length + length >= tb->maxlength - len) break; byte charwidth = GetCharacterWidth(FS_NORMAL, c); if (tb->maxwidth != 0 && width + tb->width + charwidth > tb->maxwidth) break; @@ -1253,7 +1253,7 @@ * @return pointer to utf8_buf. If conversion fails the string is of zero-length */ char *convert_from_fs(const wchar_t *name, char *utf8_buf, size_t buflen) { - int len = WideCharToMultiByte(CP_UTF8, 0, name, -1, utf8_buf, buflen, NULL, NULL); + int len = WideCharToMultiByte(CP_UTF8, 0, name, -1, utf8_buf, (int)buflen, NULL, NULL); if (len == 0) { DEBUG(misc, 0, "[utf8] W2M error converting wide-string. Errno %d", GetLastError()); utf8_buf[0] = '\0'; @@ -1272,7 +1272,7 @@ * @return pointer to utf16_buf. If conversion fails the string is of zero-length */ wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen) { - int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, utf16_buf, buflen); + int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, utf16_buf, (int)buflen); if (len == 0) { DEBUG(misc, 0, "[utf8] M2W error converting '%s'. Errno %d", name, GetLastError()); utf16_buf[0] = '\0'; Index: src/minilzo.cpp =================================================================== --- src/minilzo.cpp (Revision 13016) +++ src/minilzo.cpp (Arbeitskopie) @@ -1029,7 +1029,7 @@ { register const lzo_byte *m_pos; lzo_moff_t m_off; - lzo_uint m_len; + lzo_ptrdiff_t m_len; lzo_uint dindex; DINDEX1(dindex,ip);