From: curt Date: Mon, 30 Jul 2001 20:34:20 +0000 (+0000) Subject: Various MSVC fixes. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ff6934c832ee7df5c1d2cec9102a53da422eb4d;p=simgear.git Various MSVC fixes. --- diff --git a/simgear/metar/Dcdmetar.cpp b/simgear/metar/Dcdmetar.cpp index 73223a00..123fc8ce 100644 --- a/simgear/metar/Dcdmetar.cpp +++ b/simgear/metar/Dcdmetar.cpp @@ -1358,8 +1358,8 @@ static bool vrblVsby( char *string1, char *string2, Decoded_METAR *Mptr, int *NDEX ) { char buf[ 6 ]; - int numerator, - denominator; + /* int numerator, + denominator; */ char *slash, *V_char, *temp; @@ -1800,7 +1800,7 @@ static bool isWxToken( char *token ) if( token == NULL ) return FALSE; - for( i = 0; i < strlen(token); i++ ) + for( i = 0; i < (int)strlen(token); i++ ) { if( !(isalpha(*(token+i)) || *(token+i) == '+' || *(token+i) == '-' ) ) @@ -2365,17 +2365,14 @@ int DcdMETAR( char *string , Decoded_METAR *Mptr ) CAVOK, visibility, RVR, presentWX, PartialObscur, skyCond, tempGroup, - altimStng, NotIDed = 99} StartGroup, - SaveStartGroup, - MetarGroup; + altimStng, NotIDed = 99 } + StartGroup, SaveStartGroup, MetarGroup; - WindStruct *WinDataPtr; + // WindStruct *WinDataPtr; - int ndex, - NDEX, - i, - jkj, - j; + int ndex; + int NDEX; + // int i, jkj, j; char **token, diff --git a/simgear/metar/Dcdmtrmk.cpp b/simgear/metar/Dcdmtrmk.cpp index 3b345980..ba9e56ef 100644 --- a/simgear/metar/Dcdmtrmk.cpp +++ b/simgear/metar/Dcdmtrmk.cpp @@ -1,3 +1,5 @@ +#include + #include "Local.h" /* standard header file */ #include "Metar.h" @@ -1393,9 +1395,9 @@ static bool isVariableVsby( char **string, Decoded_METAR *Mptr, /* DECLARE LOCAL VARIABLES */ /***************************/ - char *slash, - *slash1, - *slash2, + char *slash = NULL, + *slash1 = NULL, + *slash2 = NULL, buf[ 5 ], *V_char; float minimumVsby, @@ -2788,8 +2790,8 @@ static bool isSLP( char **token, Decoded_METAR *Mptr, int *NDEX ) /* DECLARE LOCAL VARIABLES */ /***************************/ - int pressure, - ndex; + int pressure; + // int ndex; /*************************/ /* BEGIN BODY OF ROUTINE */ @@ -2861,7 +2863,7 @@ static bool isSectorVsby( char **string, Decoded_METAR *Mptr, /* DECLARE LOCAL VARIABLES */ /***************************/ - float vsby; + float vsby = 0.0f; char dd[3], *slash; @@ -4791,18 +4793,18 @@ void DcdMTRmk( char **token, Decoded_METAR *Mptr ) FZRANO = 0, TSNO = 0, maintIndicator = 0, CHINO = 0, RVRNO = 0, VISNO = 0, PNO = 0, DVR = 0; - int NDEX, - ndex, - i; - char *slash, - *tokenX, - *V_char, - *temp_token; + int NDEX; + // int ndex; + int i; + // char *slash; + // char *tokenX; + // char *V_char; + // char *temp_token; - bool extra_token, - IS_NOT_RMKS; + // bool extra_token; + bool IS_NOT_RMKS; - float T_vsby; + // float T_vsby; /*************************/ /* START BODY OF ROUTINE */ diff --git a/simgear/screen/tr.cxx b/simgear/screen/tr.cxx index c9837771..cba85767 100644 --- a/simgear/screen/tr.cxx +++ b/simgear/screen/tr.cxx @@ -2,6 +2,9 @@ /* * $Log$ + * Revision 1.3 2001/07/30 20:34:21 curt + * Various MSVC fixes. + * * Revision 1.2 2001/06/27 02:48:01 curt * Fixed a type conversion bug that could trip up some of the pickier compilers * out there. @@ -47,6 +50,8 @@ */ +#include + #include #include #include