Commit daabb4d0 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix truncation warnings in connect

parent 4de344a8
...@@ -351,7 +351,7 @@ void CSORT::Qstx(int *base, int *max) ...@@ -351,7 +351,7 @@ void CSORT::Qstx(int *base, int *max)
zlo = zhi = cnm = 0; // Avoid warning message zlo = zhi = cnm = 0; // Avoid warning message
lo = max - base; // Number of elements as longs lo = (int)(max - base); // Number of elements as longs
if (Dup) if (Dup)
cnm = Cmpnum(lo); cnm = Cmpnum(lo);
...@@ -472,7 +472,7 @@ void CSORT::Qstx(int *base, int *max) ...@@ -472,7 +472,7 @@ void CSORT::Qstx(int *base, int *max)
i = him + 1; i = him + 1;
if (Pof) if (Pof)
Pof[him - Pex] = Pof[mid - Pex] = i - j; Pof[him - Pex] = Pof[mid - Pex] = (int)(i - j);
/*******************************************************************/ /*******************************************************************/
/* Look at sizes of the two partitions, do the smaller one first */ /* Look at sizes of the two partitions, do the smaller one first */
...@@ -481,8 +481,8 @@ void CSORT::Qstx(int *base, int *max) ...@@ -481,8 +481,8 @@ void CSORT::Qstx(int *base, int *max)
/* But only repeat (recursively or by branching) if the partition */ /* But only repeat (recursively or by branching) if the partition */
/* is of at least size THRESH. */ /* is of at least size THRESH. */
/*******************************************************************/ /*******************************************************************/
lo = j - base; lo = (int)(j - base);
hi = max - i; hi = (int)(max - i);
if (Dup) { // Update progress information if (Dup) { // Update progress information
zlo = Cmpnum(lo); zlo = Cmpnum(lo);
...@@ -726,7 +726,7 @@ void CSORT::Qstc(int *base, int *max) ...@@ -726,7 +726,7 @@ void CSORT::Qstc(int *base, int *max)
zlo = zhi = cnm = 0; // Avoid warning message zlo = zhi = cnm = 0; // Avoid warning message
lo = max - base; // Number of elements as longs lo = (int)(max - base); // Number of elements as longs
if (Dup) if (Dup)
cnm = Cmpnum(lo); cnm = Cmpnum(lo);
...@@ -853,7 +853,7 @@ void CSORT::Qstc(int *base, int *max) ...@@ -853,7 +853,7 @@ void CSORT::Qstc(int *base, int *max)
/* the offset array values indicating break point and block size. */ /* the offset array values indicating break point and block size. */
/*******************************************************************/ /*******************************************************************/
if (Pof) if (Pof)
Pof[lt - Pex] = Pof[(jj - 1) - Pex] = jj - lt; Pof[lt - Pex] = Pof[(jj - 1) - Pex] = (int)(jj - lt);
/*******************************************************************/ /*******************************************************************/
/* Look at sizes of the two partitions, do the smaller one first */ /* Look at sizes of the two partitions, do the smaller one first */
...@@ -862,8 +862,8 @@ void CSORT::Qstc(int *base, int *max) ...@@ -862,8 +862,8 @@ void CSORT::Qstc(int *base, int *max)
/* But only repeat (recursively or by branching) if the partition */ /* But only repeat (recursively or by branching) if the partition */
/* is of at least size THRESH. */ /* is of at least size THRESH. */
/*******************************************************************/ /*******************************************************************/
lo = lt - base; lo = (int)(lt - base);
hi = gt - Swix; hi = (int)(gt - Swix);
if (Dup) { // Update progress information if (Dup) { // Update progress information
zlo = Cmpnum(lo); zlo = Cmpnum(lo);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#elif defined(MSX4) #elif defined(MSX4)
#import "msxml4.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ?? #import "msxml4.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ??
#elif defined(MSX6) #elif defined(MSX6)
#pragma warning(suppress : 4192)
#import "msxml6.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ?? #import "msxml6.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ??
#else // MSX4 #else // MSX4
#error MSX? is not defined #error MSX? is not defined
...@@ -540,7 +541,7 @@ PXNODE DOMNODE::AddChildNode(PGLOBAL g, PCSZ name, PXNODE np) ...@@ -540,7 +541,7 @@ PXNODE DOMNODE::AddChildNode(PGLOBAL g, PCSZ name, PXNODE np)
// If name has the format m[n] only m is taken as node name // If name has the format m[n] only m is taken as node name
if ((p = strchr(name, '['))) if ((p = strchr(name, '[')))
pn = BufAlloc(g, name, p - name); pn = BufAlloc(g, name, (int)(p - name));
else else
pn = name; pn = name;
......
...@@ -247,7 +247,7 @@ int MAPFAM::GetRowID(void) ...@@ -247,7 +247,7 @@ int MAPFAM::GetRowID(void)
/***********************************************************************/ /***********************************************************************/
int MAPFAM::GetPos(void) int MAPFAM::GetPos(void)
{ {
return Fpos - Memory; return (int)(Fpos - Memory);
} // end of GetPos } // end of GetPos
/***********************************************************************/ /***********************************************************************/
...@@ -255,7 +255,7 @@ int MAPFAM::GetPos(void) ...@@ -255,7 +255,7 @@ int MAPFAM::GetPos(void)
/***********************************************************************/ /***********************************************************************/
int MAPFAM::GetNextPos(void) int MAPFAM::GetNextPos(void)
{ {
return Mempos - Memory; return (int)(Mempos - Memory);
} // end of GetNextPos } // end of GetNextPos
/***********************************************************************/ /***********************************************************************/
...@@ -368,7 +368,7 @@ int MAPFAM::ReadBuffer(PGLOBAL g) ...@@ -368,7 +368,7 @@ int MAPFAM::ReadBuffer(PGLOBAL g)
} // endif Mempos } // endif Mempos
// Set caller line buffer // Set caller line buffer
len = (Mempos - Fpos) - n; len = (int)(Mempos - Fpos) - n;
// Don't rely on ENDING setting // Don't rely on ENDING setting
if (len > 0 && *(Mempos - 2) == '\r') if (len > 0 && *(Mempos - 2) == '\r')
...@@ -428,7 +428,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) ...@@ -428,7 +428,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc)
/* not required here, just setting of future Spos and Tpos. */ /* not required here, just setting of future Spos and Tpos. */
/*******************************************************************/ /*******************************************************************/
Tpos = Spos = Fpos; Tpos = Spos = Fpos;
} else if ((n = Fpos - Spos) > 0) { } else if ((n = (int)(Fpos - Spos)) > 0) {
/*******************************************************************/ /*******************************************************************/
/* Non consecutive line to delete. Move intermediate lines. */ /* Non consecutive line to delete. Move intermediate lines. */
/*******************************************************************/ /*******************************************************************/
...@@ -461,7 +461,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) ...@@ -461,7 +461,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc)
/*****************************************************************/ /*****************************************************************/
/* Remove extra records. */ /* Remove extra records. */
/*****************************************************************/ /*****************************************************************/
n = Tpos - Memory; n = (int)(Tpos - Memory);
#if defined(__WIN__) #if defined(__WIN__)
DWORD drc = SetFilePointer(fp->Handle, n, NULL, FILE_BEGIN); DWORD drc = SetFilePointer(fp->Handle, n, NULL, FILE_BEGIN);
...@@ -627,7 +627,7 @@ int MBKFAM::ReadBuffer(PGLOBAL g) ...@@ -627,7 +627,7 @@ int MBKFAM::ReadBuffer(PGLOBAL g)
break; break;
// Set caller line buffer // Set caller line buffer
len = (Mempos - Fpos) - Ending; len = (int)(Mempos - Fpos) - Ending;
memcpy(Tdbp->GetLine(), Fpos, len); memcpy(Tdbp->GetLine(), Fpos, len);
Tdbp->GetLine()[len] = '\0'; Tdbp->GetLine()[len] = '\0';
return RC_OK; return RC_OK;
......
...@@ -537,7 +537,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g) ...@@ -537,7 +537,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g)
while (*NxtLine++ != '\n') ; while (*NxtLine++ != '\n') ;
// Set caller line buffer // Set caller line buffer
n = NxtLine - CurLine - Ending; n = (int)(NxtLine - CurLine - Ending);
memcpy(Tdbp->GetLine(), CurLine, n); memcpy(Tdbp->GetLine(), CurLine, n);
Tdbp->GetLine()[n] = '\0'; Tdbp->GetLine()[n] = '\0';
return RC_OK; return RC_OK;
...@@ -588,7 +588,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g) ...@@ -588,7 +588,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g)
for (NxtLine = CurLine; *NxtLine++ != '\n';) ; for (NxtLine = CurLine; *NxtLine++ != '\n';) ;
// Set caller line buffer // Set caller line buffer
n = NxtLine - CurLine - Ending; n = (int)(NxtLine - CurLine - Ending);
memcpy(Tdbp->GetLine(), CurLine, n); memcpy(Tdbp->GetLine(), CurLine, n);
Tdbp->GetLine()[n] = '\0'; Tdbp->GetLine()[n] = '\0';
Rbuf = (CurBlk == Block - 1) ? Last : Nrec; Rbuf = (CurBlk == Block - 1) ? Last : Nrec;
...@@ -1087,7 +1087,7 @@ bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) ...@@ -1087,7 +1087,7 @@ bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused)))
/***********************************************************************/ /***********************************************************************/
int ZLBFAM::ReadBuffer(PGLOBAL g) int ZLBFAM::ReadBuffer(PGLOBAL g)
{ {
int n; size_t n;
void *rdbuf; void *rdbuf;
/*********************************************************************/ /*********************************************************************/
...@@ -1299,7 +1299,7 @@ int ZLBFAM::WriteBuffer(PGLOBAL g) ...@@ -1299,7 +1299,7 @@ int ZLBFAM::WriteBuffer(PGLOBAL g)
else else
NxtLine = CurLine + Lrecl; NxtLine = CurLine + Lrecl;
BlkLen = NxtLine - To_Buf; BlkLen = (int)(NxtLine - To_Buf);
if (WriteCompressedBuffer(g)) { if (WriteCompressedBuffer(g)) {
Closing = TRUE; // To tell CloseDB about a Write error Closing = TRUE; // To tell CloseDB about a Write error
......
...@@ -1351,7 +1351,7 @@ int BLKFAM::GetPos(void) ...@@ -1351,7 +1351,7 @@ int BLKFAM::GetPos(void)
/***********************************************************************/ /***********************************************************************/
int BLKFAM::GetNextPos(void) int BLKFAM::GetNextPos(void)
{ {
return Fpos + NxtLine - CurLine; return (int)(Fpos + NxtLine - CurLine);
} // end of GetNextPos } // end of GetNextPos
/***********************************************************************/ /***********************************************************************/
...@@ -1396,7 +1396,8 @@ int BLKFAM::SkipRecord(PGLOBAL, bool header) ...@@ -1396,7 +1396,8 @@ int BLKFAM::SkipRecord(PGLOBAL, bool header)
/***********************************************************************/ /***********************************************************************/
int BLKFAM::ReadBuffer(PGLOBAL g) int BLKFAM::ReadBuffer(PGLOBAL g)
{ {
int i, n, rc = RC_OK; int i, rc = RC_OK;
size_t n;
/*********************************************************************/ /*********************************************************************/
/* Sequential reading when Placed is not true. */ /* Sequential reading when Placed is not true. */
...@@ -1497,7 +1498,7 @@ int BLKFAM::ReadBuffer(PGLOBAL g) ...@@ -1497,7 +1498,7 @@ int BLKFAM::ReadBuffer(PGLOBAL g)
fin: fin:
// Store the current record file position for Delete and Update // Store the current record file position for Delete and Update
Fpos = BlkPos[CurBlk] + CurLine - To_Buf; Fpos = (int)(BlkPos[CurBlk] + CurLine - To_Buf);
return rc; return rc;
} // end of ReadBuffer } // end of ReadBuffer
...@@ -1524,7 +1525,7 @@ int BLKFAM::WriteBuffer(PGLOBAL g) ...@@ -1524,7 +1525,7 @@ int BLKFAM::WriteBuffer(PGLOBAL g)
// Now start the writing process. // Now start the writing process.
NxtLine = CurLine + strlen(CurLine); NxtLine = CurLine + strlen(CurLine);
BlkLen = NxtLine - To_Buf; BlkLen = (int)(NxtLine - To_Buf);
if (fwrite(To_Buf, 1, BlkLen, Stream) != (size_t)BlkLen) { if (fwrite(To_Buf, 1, BlkLen, Stream) != (size_t)BlkLen) {
sprintf(g->Message, MSG(FWRITE_ERROR), strerror(errno)); sprintf(g->Message, MSG(FWRITE_ERROR), strerror(errno));
......
...@@ -748,7 +748,7 @@ UNZFAM::UNZFAM(PUNZFAM txfp) : MAPFAM(txfp) ...@@ -748,7 +748,7 @@ UNZFAM::UNZFAM(PUNZFAM txfp) : MAPFAM(txfp)
/***********************************************************************/ /***********************************************************************/
int UNZFAM::GetFileLength(PGLOBAL g) int UNZFAM::GetFileLength(PGLOBAL g)
{ {
int len = (zutp && zutp->entryopen) ? Top - Memory int len = (zutp && zutp->entryopen) ? (int)(Top - Memory)
: TXTFAM::GetFileLength(g) * 3; : TXTFAM::GetFileLength(g) * 3;
if (trace) if (trace)
...@@ -1088,7 +1088,7 @@ int ZIPFAM::WriteBuffer(PGLOBAL g) ...@@ -1088,7 +1088,7 @@ int ZIPFAM::WriteBuffer(PGLOBAL g)
// Prepare to write the new line // Prepare to write the new line
strcat(strcpy(To_Buf, Tdbp->GetLine()), (Bin) ? CrLf : "\n"); strcat(strcpy(To_Buf, Tdbp->GetLine()), (Bin) ? CrLf : "\n");
len = strchr(To_Buf, '\n') - To_Buf + 1; len = (int)(strchr(To_Buf, '\n') - To_Buf + 1);
return zutp->writeEntry(g, To_Buf, len); return zutp->writeEntry(g, To_Buf, len);
} // end of WriteBuffer } // end of WriteBuffer
......
...@@ -283,7 +283,7 @@ static void yy_fatal_error YY_PROTO(( const char msg[] )); ...@@ -283,7 +283,7 @@ static void yy_fatal_error YY_PROTO(( const char msg[] ));
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \ yytext_ptr = yy_bp; \
yyleng = yy_cp - yy_bp; \ yyleng = (int)(yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \ yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yy_c_buf_p = yy_cp; yy_c_buf_p = yy_cp;
...@@ -695,7 +695,7 @@ case YY_STATE_EOF(dqt): ...@@ -695,7 +695,7 @@ case YY_STATE_EOF(dqt):
case YY_END_OF_BUFFER: case YY_END_OF_BUFFER:
{ {
/* Amount of text matched not including the EOB char. */ /* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1; int yy_amount_of_matched_text = (int)(yy_cp - yytext_ptr - 1);
/* Undo the effects of YY_DO_BEFORE_ACTION. */ /* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char; *yy_cp = yy_hold_char;
...@@ -862,7 +862,7 @@ static int yy_get_next_buffer() ...@@ -862,7 +862,7 @@ static int yy_get_next_buffer()
/* Try to read more data. */ /* Try to read more data. */
/* First move last chars to start of buffer. */ /* First move last chars to start of buffer. */
number_to_move = yy_c_buf_p - yytext_ptr; number_to_move = (int)(yy_c_buf_p - yytext_ptr);
for ( i = 0; i < number_to_move; ++i ) for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++); *(dest++) = *(source++);
...@@ -888,7 +888,7 @@ static int yy_get_next_buffer() ...@@ -888,7 +888,7 @@ static int yy_get_next_buffer()
/* just a shorter name for the current buffer */ /* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer; YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf; int yy_c_buf_p_offset = (int)(yy_c_buf_p - b->yy_ch_buf);
b->yy_buf_size *= 2; b->yy_buf_size *= 2;
b->yy_ch_buf = (char *) b->yy_ch_buf = (char *)
......
...@@ -230,13 +230,13 @@ bool MACINFO::GetOneInfo(PGLOBAL g, int flag, void *v, int lv) ...@@ -230,13 +230,13 @@ bool MACINFO::GetOneInfo(PGLOBAL g, int flag, void *v, int lv)
case 11: // Description case 11: // Description
if ((p = strstr(Curp->Description, " - Packet Scheduler Miniport"))) { if ((p = strstr(Curp->Description, " - Packet Scheduler Miniport"))) {
strncpy(buf, Curp->Description, p - Curp->Description); strncpy(buf, Curp->Description, p - Curp->Description);
i = p - Curp->Description; i = (int)(p - Curp->Description);
strncpy(buf, Curp->Description, i); strncpy(buf, Curp->Description, i);
buf[i] = 0; buf[i] = 0;
p = buf; p = buf;
} else if ((p = strstr(Curp->Description, } else if ((p = strstr(Curp->Description,
" - Miniport d'ordonnancement de paquets"))) { " - Miniport d'ordonnancement de paquets"))) {
i = p - Curp->Description; i = (int)(p - Curp->Description);
strncpy(buf, Curp->Description, i); strncpy(buf, Curp->Description, i);
buf[i] = 0; buf[i] = 0;
p = buf; p = buf;
......
...@@ -248,7 +248,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -248,7 +248,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
while (true) { while (true) {
p2 = strchr(p1, '\''); p2 = strchr(p1, '\'');
len = MY_MAX(len, p2 - p1); len = MY_MAX(len, (int)(p2 - p1));
if (*++p2 != ',') break; if (*++p2 != ',') break;
p1 = p2 + 2; p1 = p2 + 2;
} // endwhile } // endwhile
......
...@@ -2427,7 +2427,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) ...@@ -2427,7 +2427,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
else if (vlen[n] == SQL_NULL_DATA) else if (vlen[n] == SQL_NULL_DATA)
pval[n]->SetNull(true); pval[n]->SetNull(true);
else if (crp->Type == TYPE_STRING/* && vlen[n] != SQL_NULL_DATA*/) else if (crp->Type == TYPE_STRING/* && vlen[n] != SQL_NULL_DATA*/)
pval[n]->SetValue_char(pbuf[n], vlen[n]); pval[n]->SetValue_char(pbuf[n], (int)vlen[n]);
else else
pval[n]->SetNull(false); pval[n]->SetNull(false);
......
...@@ -540,7 +540,7 @@ bool EvalLikePattern(LPCSTR sp, LPCSTR tp) ...@@ -540,7 +540,7 @@ bool EvalLikePattern(LPCSTR sp, LPCSTR tp)
{ {
LPSTR p; LPSTR p;
char c; char c;
int n; ssize_t n;
bool b, t = false; bool b, t = false;
if (trace) if (trace)
......
...@@ -934,7 +934,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g) ...@@ -934,7 +934,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g)
if (p) { if (p) {
//len = p++ - p2; //len = p++ - p2;
len = p - p2 - 1;; len = (int)(p - p2 - 1);
// if (Sep != ' ') // if (Sep != ' ')
// for (; *p == ' '; p++) ; // Skip blanks // for (; *p == ' '; p++) ; // Skip blanks
...@@ -978,7 +978,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g) ...@@ -978,7 +978,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g)
return RC_NF; return RC_NF;
} else if ((p = strchr(p2, Sep))) } else if ((p = strchr(p2, Sep)))
len = p - p2; len = (int)(p - p2);
else if (i == Fields - 1) else if (i == Fields - 1)
len = strlen(p2); len = strlen(p2);
else if (Accept && Maxerr == 0) { else if (Accept && Maxerr == 0) {
...@@ -996,7 +996,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g) ...@@ -996,7 +996,7 @@ int TDBCSV::ReadBuffer(PGLOBAL g)
} else } else
len = 0; len = 0;
Offset[i] = p2 - To_Line; Offset[i] = (int)(p2 - To_Line);
if (Mode != MODE_UPDATE) if (Mode != MODE_UPDATE)
Fldlen[i] = len; Fldlen[i] = len;
......
...@@ -367,13 +367,13 @@ void MACCOL::ReadColumn(PGLOBAL g) ...@@ -367,13 +367,13 @@ void MACCOL::ReadColumn(PGLOBAL g)
case 11: // Description case 11: // Description
if ((p = strstr(adp->Description, " - Packet Scheduler Miniport"))) { if ((p = strstr(adp->Description, " - Packet Scheduler Miniport"))) {
strncpy(buf, adp->Description, p - adp->Description); strncpy(buf, adp->Description, p - adp->Description);
i = p - adp->Description; i = (int)(p - adp->Description);
strncpy(buf, adp->Description, i); strncpy(buf, adp->Description, i);
buf[i] = 0; buf[i] = 0;
p = buf; p = buf;
} else if ((p = strstr(adp->Description, } else if ((p = strstr(adp->Description,
" - Miniport d'ordonnancement de paquets"))) { " - Miniport d'ordonnancement de paquets"))) {
i = p - adp->Description; i = (int)(p - adp->Description);
strncpy(buf, adp->Description, i); strncpy(buf, adp->Description, i);
buf[i] = 0; buf[i] = 0;
p = buf; p = buf;
......
...@@ -1738,7 +1738,7 @@ DECVAL::DECVAL(PSZ s) : TYPVAL<PSZ>(s) ...@@ -1738,7 +1738,7 @@ DECVAL::DECVAL(PSZ s) : TYPVAL<PSZ>(s)
if (s) { if (s) {
char *p = strchr(Strp, '.'); char *p = strchr(Strp, '.');
Prec = (p) ? Len - (p - Strp) : 0; Prec = (p) ? (int)(Len - (p - Strp)) : 0;
} // endif s } // endif s
Type = TYPE_DECIM; Type = TYPE_DECIM;
...@@ -2647,7 +2647,7 @@ bool DTVAL::SetValue_char(const char *p, int n) ...@@ -2647,7 +2647,7 @@ bool DTVAL::SetValue_char(const char *p, int n)
// Trim trailing blanks // Trim trailing blanks
for (p2 = p + n -1; p < p2 && *p2 == ' '; p2--); for (p2 = p + n -1; p < p2 && *p2 == ' '; p2--);
if ((rc = (n = p2 - p + 1) > Len)) if ((rc = (n = (int)(p2 - p + 1)) > Len))
n = Len; n = Len;
memcpy(Sdate, p, n); memcpy(Sdate, p, n);
......
...@@ -204,7 +204,7 @@ STRING::STRING(PGLOBAL g, uint n, PCSZ str) ...@@ -204,7 +204,7 @@ STRING::STRING(PGLOBAL g, uint n, PCSZ str)
*Strp = 0; *Strp = 0;
Next = GetNext(); Next = GetNext();
Size = Next - Strp; Size = (int)(Next - Strp);
Trc = false; Trc = false;
} else { } else {
// This should normally never happen // This should normally never happen
...@@ -239,7 +239,7 @@ char *STRING::Realloc(uint len) ...@@ -239,7 +239,7 @@ char *STRING::Realloc(uint len)
p = Strp; p = Strp;
Next = GetNext(); Next = GetNext();
Size = Next - p; Size = (int)(Next - p);
return p; return p;
} // end of Realloc } // end of Realloc
......
Markdown is supported
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