FS#1997 — Several warnings and one error (VS9/x64)
| Bug Report | |
| Build system / Makefile | |
| New | |
| No-one | |
| Windows |
| High | |
| Normal | |
| Devel (specify rev) | |
| Undecided | |
| Undecided | |
![]() |
Hi,
I try to compile the current rev 13001 on Vista with VS9 and for 64bit (if I switch to 'normal' 32bit all is OK).
Current are 73! warnings, yesterday it was ~68 and two days before ~63 (the error is since today). I would say: the wrong way ;) .
Attached the compile log. It's german, but this shouldn't a problem. The warnings are all "conversion from ... to ..." and the error "negative index".
Cheers,
Rindvieh
I try to compile the current rev 13001 on Vista with VS9 and for 64bit (if I switch to 'normal' 32bit all is OK).
Current are 73! warnings, yesterday it was ~68 and two days before ~63 (the error is since today). I would say: the wrong way ;) .
Attached the compile log. It's german, but this shouldn't a problem. The warnings are all "conversion from ... to ..." and the error "negative index".
Cheers,
Rindvieh
This task depends upon
This task blocks these from closing

x64-compile_warnings.txt
The attached patch should remove some of the warnings.
And the following attached patch might remove the error. But I'm not sure, so please test and report back.
@glx: yes this patch works. Now 44 warnings left (see attached file).
@Rubidium: no sorry, with your patch the same error is still there.
Cheers,
Rindvieh
Rindvieh, can you test following patch? It will crash, but will tell how much memory it needs.
It would be good to know results both with and without Rubidium's patch.
Smatz, here you have it:
without Rubidiums patch: sizeof(replaceveh_d) == 120, sizeof(EngineList) == 48
with Rubidiums patch: sizeof(replaceveh_d) == 112, sizeof(EngineList) == 48
The attached patch should remove another 4 warnings.
Yes, now 40 warnings left. But now are 2 errors.
In relase mode of VS9 std::vector is just too big, I don't see a way around increasing WINDOW_CUSTOM_SIZE.
Attached is a patch for some easy warnings, some data type changes and three casts that can't be avoided because they are in function calls to library functions that we can't change.
EDIT: looks like you were faster on with some changes :) But at least the change for spritecache.cpp:GetSpriteCacheUsage is wrong, because you didn't update the format strings in the DEBUG statements. Note that size_t can't be used completely portable in printf and friends.
Hi michi_cc,
with only your patch are 36 warnings left and only 1 error (the new one was from glxs patch, I think).
Yes my patch caused the new error :)
It should be fixed with this version.
There's still a problem with declaring GetSpriteCacheUsage() to return size_t. The problem are the DEBUG calls:
DEBUG(sprite, 3, "Fixing lru %d, inuse=%d", _sprite_lru_counter, GetSpriteCacheUsage());
The format specifier %d can only be used in 32-bit mode for size_t, a fully C99 compatible clib should support %zd which has automatically the right width, C90 clibs should use %ld and a cast to unsigned long (working because unix long is 64-bit in 64-bit mode), and %Id for MSVC. That's certainly messy.
40 warnings and one error :)
Hey,
how is the progress to fix the error that a compilation for x64 will be possible again?
I've tested which rev broken it, it was r12995. Maybe that can help you.
Cheers,
Rindvieh
The compile error should be solved by r13037.
Yes Rubidium, it compile now errorless. Thank you.
Now there are only 36 warnings left :) .
Cheers,
Rindvieh