dxx-rebirth/common
Kp edc3b93c9b Switch valptridx array_size error reporting to %lu
x86_64-w64-mingw32-g++ -Wformat handling misparses the std::size_t
format string, causing a spurious error.

    common/main/valptridx.tcc: In function 'void untyped_index_mismatch_exception::prepare_report(const char*, unsigned int, const void*, long int, const void*, const void*, char (&)[229], std::size_t)':
    common/main/valptridx.tcc:36:182: error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'std::size_t {aka long long unsigned int}' [-Werror=format=]

This occurs even though the processed text uses %I64u (which is correct
for a `long long unsigned int`), not %u as shown in the error message.

    static void prepare_report(const char *const filename, const unsigned lineno, const void *const array_base, const long supplied_index, const void *const expected_pointer, const void *const actual_pointer, char (&buf)[report_buffer_size], const std::size_t array_size)
    {
	snprintf(buf, sizeof(buf), "%s:%u: " "pointer/index mismatch:" " base=%p size=%" "I64u" " index=%li expected=%p actual=%p", filename, lineno, array_base, array_size, supplied_index, expected_pointer, actual_pointer);
    }

In practice, all such sizes will fit in `unsigned int` because they are
the dimension of an array of large structures.  Switch all platforms to
use `unsigned long`, which works everywhere and is at least as big as
`unsigned int`.  Using `unsigned long` produces the same size as
`std::size_t` on all platforms other than Win64, where `unsigned long`
is only 32 bits due to the strange LLP64 model Microsoft picked.
2017-04-22 21:23:55 +00:00
..
2d Work around i686-w64-mingw32-g++ compiler crash 2017-04-22 21:23:55 +00:00
3d Pass up various return values 2017-02-26 00:00:02 +00:00
arch Move ogl_sync fence into local scope for before_swap 2017-04-08 16:48:19 +00:00
editor
include Set size of bm_mode to uint8_t 2017-04-08 16:48:17 +00:00
main Switch valptridx array_size error reporting to %lu 2017-04-22 21:23:55 +00:00
maths
mem
misc Fix check_header_includes=1 poison.h 2017-02-19 19:33:36 +00:00
texmap Simplify draw_tmap interpolation 2017-03-10 01:22:24 +00:00
ui Pass canvas to gr_init_font 2017-03-11 19:56:22 +00:00