Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old June 30, 2011, 12:11   #1
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
UnAngband - inconsistent variable declaration

Hi,

I've been trying to compile&debug directly from VS2010. I've been able successfully compile and run it, but it required to make some small changes to source code - all of them related to non C compliant variable declaration.

cmd5.c (l:420) has declared 3 variables after if statement. moving them to begining of scope solves the problem.

store.c (l:2425) contains int old_number variable declared inline, moving it to begining of function together with other variables solves the problem.

The source code is taken from download unangband-064a-src.zip

Regards
Azerath is offline   Reply With Quote
Old July 3, 2011, 08:04   #2
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 45
Posts: 872
andrewdoull is on a distinguished road
Thanks - will fix.

I'm a little surprised gcc wasn't picking this up and at least generating warnings.
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old July 3, 2011, 21:26   #3
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
Maybe "pedantic" switch to compiler would help? Without this declaration cane be anywhere not only at begining of block.
Azerath is offline   Reply With Quote
Old July 4, 2011, 07:23   #4
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by andrewdoull View Post
Thanks - will fix.

I'm a little surprised gcc wasn't picking this up and at least generating warnings.
The issues are legal C99, but illegal C90. MSVC is a C90 compiler, and makes no pretence of comprehensive C99 support.
__________________
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
zaimoni is offline   Reply With Quote
Old July 4, 2011, 11:30   #5
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
Pssst! Pssst! hold your horse boy! I'm not an enemy! Next time you would fight with MS evil! :-)

If you want to prevent from Windows corruption in roguelikes world, just create Angband version that prevents in license running from windows systems ;-)
Azerath is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Unangband Deranged Archivist Variants 27 October 28, 2010 08:17
Unangband - Traps Whelk Variants 3 August 1, 2010 20:46
Unangband help Lankiel Variants 4 February 21, 2010 19:53
inconsistent durations in V PowerDiver Development 7 September 3, 2009 08:21
UnAngband! Bandobras Variants 17 May 28, 2007 20:32


All times are GMT +1. The time now is 15:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.