Various MSVC fixes.

This commit is contained in:
curt 2001-07-30 20:34:20 +00:00
parent e04839765d
commit 9ff6934c83
3 changed files with 32 additions and 28 deletions

View File

@ -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,

View File

@ -1,3 +1,5 @@
#include <simgear/compiler.h>
#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 */

View File

@ -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 <simgear/compiler.h>
#include <assert.h>
#include <math.h>
#include <stdlib.h>