![]() |
#1 |
Veteran
Join Date: Jun 2007
Posts: 1,393
![]() |
64-bit warning cleanliness patch
I've attached a little patch to cmd4.c to get it to compile cleanly on 64-bit (Ubuntu). The patch is against r1867.
|
![]() |
![]() |
![]() |
#2 | |
Hellband maintainer
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 46
Posts: 367
Donated: $120
![]() |
Quote:
T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! * |
|
![]() |
![]() |
![]() |
#3 |
Veteran
Join Date: Jun 2007
Posts: 1,393
![]() |
Yeah, it seems a bit excessive, but I couldn't think of a prettier (and portable) way to do it.
![]() |
![]() |
![]() |
![]() |
#4 | |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Quote:
Code:
- int page = (int)vpage; + intptr_t page = (intptr_t)vpage); Note that on sufficiently strict hardware, you die on the function call to do_cmd_option_aux anyway. If the hardware both requires special pointer registers to do anything, and faults instantly on an invalid pointer entering those registers: fatality during evaluating the arguments for the function call, if not in constructing the reference data structs to begin with. So, if MSVC is to be supported, the given patch is indeed minimal.
__________________
Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg. Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.) Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011 |
|
![]() |
![]() |
![]() |
#5 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,860
Donated: $40
![]() |
A reasonable thing to do is use size_t (or long), and to typedef size_t appropriately for windows on x86 and x64.
Also, can't you use 4L etc for long integers? |
![]() |
![]() |
![]() |
#6 | |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Quote:
Code:
#include <stddef.h> Yes. That's probably not what's frying 64-bit *NIX, however.
__________________
Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg. Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.) Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011 |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Down to a single compiler warning. | PaulBlay | Development | 9 | May 20, 2009 17:20 |
Link warning | Nick | Development | 12 | April 17, 2009 01:36 |
Help with diving (warning: long) | bebo | Vanilla | 6 | January 22, 2009 03:23 |
Something a bit different | Aknight | Variants | 22 | June 25, 2008 21:13 |
Will we get rid of the 32 bit flag variables? | Bandobras | Vanilla | 18 | December 22, 2007 15:54 |