Commit 64944f3b authored by Alois SCHLOEGL's avatar Alois SCHLOEGL
Browse files

address some compiler warnings on x64

parent 9e09bde2
......@@ -377,12 +377,12 @@ BOOL MCTG_Match700BSignalIDs( UINT uSerialNum, UINT uChannelID, LPARAM lparamS
//---------------------------------------------------------------------------------
// TIMERNUMBER <--> Channel, AXOBUS, COM PORT
void Timer2Chans( UINT TimerId, UINT TimerBase, UINT* nMC )
void Timer2Chans( size_t TimerId, size_t TimerBase, size_t* nMC )
{
*nMC = ( TimerId - TimerBase );
}
UINT Chans2Timer( UINT TimerBase, UINT nMC )
UINT Chans2Timer(size_t TimerBase, size_t nMC )
{
return TimerBase + nMC;
}
......@@ -532,7 +532,7 @@ void OnConnect( HWND hWnd, UINT nMC )
{
char sMsg[2000], sMsg1[200];
LPARAM lparamSignalIDs;
UINT uRetVal;
size_t uRetVal;
int tp, sn, ab, ch, po;
ASSERT(hWnd != NULL, "Window handle in OnConnect() is NULL");
......@@ -620,9 +620,9 @@ void OnClose( HWND hWnd, UINT nMC ) // UNTESTED
void OnRequest( HWND hWnd, UINT nMC )
{
char sMsg[2000], sMsg1[1000];
LPARAM SignalID;
UINT tp, sn, po, ab, ch;
UINT uRetVal;
LPARAM SignalID;
UINT tp, sn, po, ab, ch;
size_t uRetVal;
ASSERT( hWnd != NULL, "Window handle in OnRequest() is NULL" );
......@@ -658,7 +658,7 @@ void OnBroadcast( HWND hWnd )
{
char sMsg[2000];
// LPARAM lparamSignalIDs;
UINT uRetVal;
size_t uRetVal;
ASSERT(hWnd != NULL, "Window handle in OnBroadcast is NULL " );
......@@ -942,12 +942,12 @@ int ProcessTimerMsg( HWND hwnd, WPARAM TimerId ) //todo return TRUE,FALSE or br
int ProcessCopydataMsg( HWND hwnd, LPARAM ptrCopydataStruct ) //todo return TRUE,FALSE or break????
{
int po = 0;
int po = 0;
char sMsg[2000], sMsg1[200];
UINT uRetVal;
size_t uRetVal;
char sSerialNumber[64];
int nSerialNumber;
int nMC;
int nSerialNumber;
int nMC;
BOOL bIs700B;
MC_TELEGRAPH_DATA* pmctdReceived;
COPYDATASTRUCT* pcpds = (COPYDATASTRUCT*) ptrCopydataStruct;
......@@ -1280,7 +1280,7 @@ int xMCTgPickupInfo( struct { Handle sRes; }*p )
extern char gsAllChan[];
Handle str1 = NIL;
char errbuf[4000];
int len = strlen( gsAllChan );
size_t len = strlen( gsAllChan );
int err = 0;
if (( str1 = NewHandle( len )) == NIL ) // get output handle , do not provide space for '\0'
{
......
......@@ -9,11 +9,11 @@
/////////////////////////////////////////////////////////////////////////////
int ItemsInList( char *sString, char *sSep )
size_t ItemsInList( char *sString, char *sSep )
{
// Returns number of items in list, last separator may be missing or not
BOOL bLastSepIsMissing = 0;
int len = strlen( sString ), nItems;
size_t len = strlen( sString ), nItems;
if ( len == 0 || len > kMAXSTRING - 3 || strlen( sSep ) != 1 )
return -1; // error
......@@ -31,7 +31,8 @@ void StringFromList( int index, char *sString, char *sSep, char *sItem )
// Extracts sItem and returns number of items in list
// STRING LENGTH is LIMITED TO 'kMAXSTRING'
char sStringCopy[ kMAXSTRING ] = "";
int posBeg=-1, posEnd=-1, nSeps=-1, len;
int posBeg = -1, posEnd = -1, nSeps = -1;
size_t len;
// char buf[100];
strcpy( sItem, "" );
......@@ -96,7 +97,8 @@ char *StringFromList( int index, char *sString, char *sSep )
int CountSepsInList( char *sString, char *sSep )
{
int cnt = 0, i, len = strlen( sString );
int cnt = 0, i;
size_t len = strlen(sString);
for ( i = 0; i < len; i += 1 )
if ( sString[ i ] == sSep[ 0 ] )
cnt += 1;
......
......@@ -2,7 +2,7 @@
// XopUtils.h
int ItemsInList( char *sString, char *sSep );
size_t ItemsInList( char *sString, char *sSep );
void StringFromList( int index, char *sString, char *sSep, char* sItem );
//char *StringFromList( int index, char *sString, char *sSep );
int CountSepsInList( char *sString, char *sSep );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment