1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed compiler warnings from connect engine

- clang complains about register in C++
- Removed not used variables
- Fixed bug when printing date in filamdbf.cpp
- Added {} to fix warning about dangling else
- Changed connect_done_func() to be global to remove conflict with header
  files
- Added extra () around assignment in if
This commit is contained in:
Monty
2019-08-08 22:52:22 +03:00
committed by Sergei Golubchik
parent de8b51fdc9
commit a38f47e90c
23 changed files with 81 additions and 62 deletions

View File

@ -253,7 +253,7 @@ PQRYRES DBFColumns(PGLOBAL g, PCSZ dp, PCSZ fn, bool info)
mainhead.Encryptflag, mainhead.Mdxflag, mainhead.Language);
htrc("%hd records, last changed %02d/%02d/%d\n",
mainhead.Records(), mainhead.Filedate[1], mainhead.Filedate[2],
mainhead.Filedate[0] + (mainhead.Filedate[0] <= 30) ? 2000 : 1900);
mainhead.Filedate[0] + ((mainhead.Filedate[0] <= 30) ? 2000 : 1900));
htrc("Field Type Offset Len Dec Set Mdx\n");
} // endif trace

View File

@ -647,7 +647,7 @@ int ZBKFAM::WriteBuffer(PGLOBAL g)
int ZBKFAM::DeleteRecords(PGLOBAL g, int irc)
{
if (irc == RC_EF) {
LPCSTR name = Tdbp->GetName();
(void) Tdbp->GetName(); // XXX Should be removed ?
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
defp->SetBlock(0);
@ -673,7 +673,7 @@ void ZBKFAM::CloseTableFile(PGLOBAL g, bool)
int rc = RC_OK;
if (Tdbp->GetMode() == MODE_INSERT) {
LPCSTR name = Tdbp->GetName();
(void) Tdbp->GetName(); // XXX Should be removed?
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
if (CurNum && !Closing) {
@ -1355,7 +1355,7 @@ void ZLBFAM::CloseTableFile(PGLOBAL g, bool)
int rc = RC_OK;
if (Tdbp->GetMode() == MODE_INSERT) {
LPCSTR name = Tdbp->GetName();
(void) Tdbp->GetName(); // XXX Should be removed?
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
// Closing is True if last Write was in error

View File

@ -1547,13 +1547,14 @@ int BLKFAM::WriteBuffer(PGLOBAL g)
// T_Stream is the temporary stream or the table file stream itself
if (!T_Stream)
{
if (UseTemp /*&& Tdbp->GetMode() == MODE_UPDATE*/) {
if (OpenTempFile(g))
return RC_FX;
} else
T_Stream = Stream;
}
if (UseTemp) {
/*****************************************************************/
/* We are using a temporary file. Before writing the updated */

View File

@ -1223,12 +1223,16 @@ bool FILTER::Eval(PGLOBAL g)
PDBUSER dup = PlgGetUser(g);
if (Opc <= OP_XX)
{
for (i = 0; i < 2; i++)
{
// Evaluate the object and eventually convert it.
if (Arg(i)->Eval(g))
return TRUE;
else if (Test[i].Conv)
Val(i)->SetValue_pval(Arg(i)->GetValue());
}
}
if (trace(1))
htrc(" Filter: op=%d type=%d %d B_T=%d %d val=%p %p\n",

View File

@ -243,9 +243,6 @@ void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
static void yy_push_state YY_PROTO(( int new_state ));
static void yy_pop_state YY_PROTO(( void ));
static int yy_top_state YY_PROTO(( void ));
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
@ -1266,6 +1263,7 @@ FILE *file;
}
#ifdef NOT_USED
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
@ -1297,7 +1295,6 @@ int new_state;
BEGIN(new_state);
}
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
@ -1311,6 +1308,7 @@ static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif /* NOT_USED */
#ifdef YY_USE_PROTOS

View File

@ -782,7 +782,7 @@ static int connect_init_func(void *p)
@brief
Plugin clean up
*/
static int connect_done_func(void *)
int connect_done_func(void *)
{
int error= 0;
PCONNECT pc, pn;

View File

@ -112,8 +112,6 @@ static PROFILE *MRUProfile[N_CACHED_PROFILES] = {NULL};
//static CRITICAL_SECTION PROFILE_CritSect = CRITICAL_SECTION_INIT("PROFILE_CritSect");
static const char hex[17] = "0123456789ABCDEF";
BOOL WritePrivateProfileString(LPCSTR section, LPCSTR entry,
LPCSTR string, LPCSTR filename);

View File

@ -347,7 +347,7 @@ bool JAVAConn::GetJVM(PGLOBAL g)
/***********************************************************************/
bool JAVAConn::Open(PGLOBAL g)
{
bool brc = true, err = false;
bool brc = true;
jboolean jt = (trace(1));
// Link or check whether jvm library was linked

View File

@ -769,7 +769,6 @@ bool JDBConn::Connect(PJPARM sop)
int irc = RC_FX;
bool err = false;
jint rc;
jboolean jt = (trace(1));
PGLOBAL& g = m_G;
/*******************************************************************/
@ -939,7 +938,7 @@ int JDBConn::Rewind(PCSZ sql)
if (gmID(m_G, fetchid, "Fetch", "(I)Z"))
return -1;
jboolean b = env->CallBooleanMethod(job, fetchid, 0);
(void) env->CallBooleanMethod(job, fetchid, 0);
rbuf = m_Rows;
} else if (ExecuteCommand(sql) != RC_FX)
@ -1191,7 +1190,7 @@ int JDBConn::ExecuteUpdate(PCSZ sql)
/***********************************************************************/
int JDBConn::GetResultSize(PCSZ sql, PCOL colp)
{
int rc, n = 0;
int rc;
if ((rc = ExecuteQuery(sql)) != RC_OK)
return -1;
@ -1493,7 +1492,6 @@ bool JDBConn::SetParam(JDBCCOL *colp)
PCSZ fnc = "Unknown";
uint n;
short len, tp;
int crow = 0;
PQRYRES qrp = cap->Qrp;
PCOLRES crp;
jboolean rc = false;

View File

@ -247,7 +247,7 @@ my_bool JSNX::ParseJpath(PGLOBAL g)
{
char *p, *p1 = NULL, *p2 = NULL, *pbuf = NULL;
int i;
my_bool a, mul = false;
my_bool a;
if (Parsed)
return false; // Already done
@ -424,7 +424,6 @@ PVAL JSNX::GetColumnValue(PGLOBAL g, PJSON row, int i)
/*********************************************************************************/
PJVAL JSNX::GetRowValue(PGLOBAL g, PJSON row, int i, my_bool b)
{
my_bool expd = false;
PJAR arp;
PJVAL val = NULL;
@ -763,7 +762,7 @@ my_bool JSNX::WriteValue(PGLOBAL g, PJVAL jvalp)
PSZ JSNX::Locate(PGLOBAL g, PJSON jsp, PJVAL jvp, int k)
{
PSZ str = NULL;
my_bool b = false, err = true;
my_bool err = true;
g->Message[0] = 0;
@ -885,7 +884,7 @@ my_bool JSNX::LocateValue(PJVAL jvp)
PSZ JSNX::LocateAll(PGLOBAL g, PJSON jsp, PJVAL jvp, int mx)
{
PSZ str = NULL;
my_bool b = false, err = true;
my_bool err = true;
PJPN jnp;
if (!jsp) {
@ -1352,7 +1351,7 @@ static PBSON MakeBinResult(PGLOBAL g, UDF_ARGS *args, PJSON top, ulong len, int
bsnp->Pretty = pretty;
if (bsnp->Filename = (char*)args->args[0]) {
if ((bsnp->Filename = (char*)args->args[0])) {
bsnp->Filename = MakePSZ(g, args, 0);
strncpy(bsnp->Msg, bsnp->Filename, BMX);
} else
@ -3755,11 +3754,13 @@ my_bool jsonlocate_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
strcpy(message, "Third argument is not an integer (rank)");
return true;
} else if (args->arg_count > 3)
{
if (args->arg_type[3] != INT_RESULT) {
strcpy(message, "Fourth argument is not an integer (memory)");
return true;
} else
more += (ulong)*(longlong*)args->args[2];
}
CalcLen(args, false, reslen, memlen);
@ -5178,7 +5179,7 @@ char *jbin_object_delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
PCSZ key;
PJOB jobp;
PJVAL jvp = MakeValue(g, args, 0, &top);
PJSON jsp = jvp->GetJson();
(void) jvp->GetJson(); // XXX Should be removed?
if (CheckPath(g, args, top, jvp, 2))
PUSH_WARNING(g->Message);
@ -5889,7 +5890,7 @@ long long countin(UDF_INIT *initid, UDF_ARGS *args, char *result,
memcpy(str2, args->args[1], lg);
str2[lg] = 0;
while (s = strstr(s, str2)) {
while ((s = strstr(s, str2))) {
n++;
s += lg;
} // endwhile

View File

@ -190,7 +190,7 @@ bool CloseMemMap(void *memory, size_t dwSize)
{
if (memory) {
// All this must be redesigned
int rc = msync((char*)memory, dwSize, MS_SYNC);
msync((char*)memory, dwSize, MS_SYNC);
return (munmap((char*)memory, dwSize) < 0) ? true : false;
} else
return false;

View File

@ -140,7 +140,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
PCSZ fmt;
char *fld, *colname, *chset, v, buf[128], uns[16], zero[16];
int i, n, nf = 0, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec, rc, k = 0;
int len, type, prec, rc;
bool b;
PQRYRES qrp;
PCOLRES crp;

View File

@ -425,6 +425,8 @@ char *ExtractFromPath(PGLOBAL g, char *pBuff, char *FileName, OPVAL op)
return pBuff;
} // end of PlgExtractFromPath
#ifdef NOT_USED
/***********************************************************************/
/* Check the occurence and matching of a pattern against a string. */
/* Because this function is only used for catalog name checking, */
@ -443,6 +445,7 @@ static bool PlugCheckPattern(PGLOBAL g, LPCSTR string, LPCSTR pat)
return true;
} // end of PlugCheckPattern
#endif /* NOT_USED */
/***********************************************************************/
/* PlugEvalLike: evaluates a LIKE clause. */

View File

@ -562,8 +562,6 @@ int TDBDOS::ResetTableOpt(PGLOBAL g, bool dop, bool dox)
MaxSize = -1; // Size must be recalculated
Cardinal = -1; // as well as Cardinality
PTXF xp = Txfp;
To_Filter = NULL; // Disable filtering
//To_BlkIdx = NULL; // and index filtering
To_BlkFil = NULL; // and block filtering
@ -635,8 +633,9 @@ int TDBDOS::MakeBlockValues(PGLOBAL g)
PDOSDEF defp = (PDOSDEF)To_Def;
PDOSCOL colp = NULL;
PDBUSER dup = PlgGetUser(g);
PCATLG cat = defp->GetCat();
//void *memp = cat->GetDescp();
(void) defp->GetCat(); // XXX Should be removed?
if ((nrec = defp->GetElemt()) < 2) {
if (!To_Def->Partitioned()) {
@ -998,16 +997,18 @@ bool TDBDOS::GetBlockValues(PGLOBAL g)
{
char filename[_MAX_PATH];
int i, lg, n[NZ];
int nrec, block = 0, last = 0, allocblk = 0;
int nrec, block = 0, last = 0;
int len;
bool newblk = false;
size_t ndv, nbm, nbk, blk;
FILE *opfile;
PCOLDEF cdp;
PDOSDEF defp = (PDOSDEF)To_Def;
PCATLG cat = defp->GetCat();
PDBUSER dup = PlgGetUser(g);
(void) defp->GetCat(); // XXX Should be removed?
#if 0
if (Mode == MODE_INSERT && Txfp->GetAmType() == TYPE_AM_DOS)
return false;
@ -1287,7 +1288,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif blk
int i, op = filp->GetOpc(), opm = filp->GetOpm(), n = 0;
int i, op = filp->GetOpc(), opm = filp->GetOpm();
bool cnv[2];
PCOL colp;
PXOB arg[2] = {NULL,NULL};
@ -1330,12 +1331,13 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
bfp = new(g) BLKSPCIN(g, this, op, opm, arg, Txfp->Nrec);
} else if (blk && Txfp->Nrec > 1 && colp->IsClustered())
{
// Clustered column and constant array
if (colp->GetClustered() == 2)
bfp = new(g) BLKFILIN2(g, this, op, opm, arg);
else
bfp = new(g) BLKFILIN(g, this, op, opm, arg);
}
} // endif this
#if 0
@ -1412,12 +1414,12 @@ PBF TDBDOS::CheckBlockFilari(PGLOBAL g, PXOB *arg, int op, bool *cnv)
//bool conv = false, xdb2 = false, ok = false, b[2];
//PXOB *xarg1, *xarg2 = NULL, xp[2];
int i, n = 0, type[2] = {0,0};
bool conv = false, xdb2 = false, ok = false;
PXOB *xarg2 = NULL, xp[2];
bool conv = false, xdb2 = false;
PXOB xp[2];
PCOL colp;
//LSTVAL *vlp = NULL;
//SFROW *sfr[2];
PBF *fp = NULL, bfp = NULL;
PBF bfp = NULL;
for (i = 0; i < 2; i++) {
switch (arg[i]->GetType()) {
@ -1648,7 +1650,7 @@ int TDBDOS::TestBlock(PGLOBAL g)
int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
{
int k, n, rc = RC_OK;
bool fixed, doit, sep, b = (pxdf != NULL);
bool fixed, doit, sep;
PCOL *keycols, colp;
PIXDEF xdp, sxp = NULL;
PKPDEF kdp;
@ -2822,6 +2824,7 @@ bool DOSCOL::SetBitMap(PGLOBAL g)
bool DOSCOL::CheckSorted(PGLOBAL g)
{
if (Sorted)
{
if (OldVal) {
// Verify whether this column is sorted all right
if (OldVal->CompareValue(Value) > 0) {
@ -2834,7 +2837,7 @@ bool DOSCOL::CheckSorted(PGLOBAL g)
} else
OldVal = AllocateValue(g, Value);
}
return false;
} // end of CheckSorted

View File

@ -53,7 +53,6 @@
/***********************************************************************/
extern int num_read, num_there, num_eq[2]; // Statistics
static const longlong M2G = 0x80000000;
static const longlong M4G = (longlong)2 * M2G;
char BINCOL::Endian = 'H';
/***********************************************************************/

View File

@ -312,12 +312,13 @@ PQRYRES CSVColumns(PGLOBAL g, PCSZ dp, PTOS topt, bool info)
} else if (*p == q) {
if (phase == 0) {
if (blank)
{
if (++nerr > mxr) {
sprintf(g->Message, MSG(MISPLACED_QUOTE), num_read);
goto err;
} else
goto skip;
}
n = 0;
phase = digit = 1;
} else if (phase == 1) {
@ -342,11 +343,13 @@ PQRYRES CSVColumns(PGLOBAL g, PCSZ dp, PTOS topt, bool info)
} else {
if (phase == 2)
{
if (++nerr > mxr) {
sprintf(g->Message, MSG(MISPLACED_QUOTE), num_read);
goto err;
} else
goto skip;
}
// isdigit cannot be used here because of debug assert
if (!strchr("0123456789", *p)) {
@ -363,11 +366,13 @@ PQRYRES CSVColumns(PGLOBAL g, PCSZ dp, PTOS topt, bool info)
} // endif's *p
if (phase == 1)
{
if (++nerr > mxr) {
sprintf(g->Message, MSG(UNBALANCE_QUOTE), num_read);
goto err;
} else
goto skip;
}
if (n) {
len[i] = MY_MAX(len[i], n);
@ -741,6 +746,7 @@ bool TDBCSV::OpenDB(PGLOBAL g)
PCSVCOL colp;
if (!Fields) // May have been set in TABFMT::OpenDB
{
if (Mode != MODE_UPDATE && Mode != MODE_INSERT) {
for (colp = (PCSVCOL)Columns; colp; colp = (PCSVCOL)colp->Next)
if (!colp->IsSpecial() && !colp->IsVirtual())
@ -753,6 +759,7 @@ bool TDBCSV::OpenDB(PGLOBAL g)
for (cdp = tdp->GetCols(); cdp; cdp = cdp->GetNext())
if (!cdp->IsSpecial() && !cdp->IsVirtual())
Fields++;
}
Offset = (int*)PlugSubAlloc(g, NULL, sizeof(int) * Fields);
Fldlen = (int*)PlugSubAlloc(g, NULL, sizeof(int) * Fields);
@ -774,6 +781,7 @@ bool TDBCSV::OpenDB(PGLOBAL g)
} // endfor i
if (Field)
{
// Prepare writing fields
if (Mode != MODE_UPDATE) {
for (colp = (PCSVCOL)Columns; colp; colp = (PCSVCOL)colp->Next)
@ -796,7 +804,7 @@ bool TDBCSV::OpenDB(PGLOBAL g)
Fldlen[i] = len;
Fldtyp[i] = IsTypeNum(cdp->GetType());
} // endif cdp
}
} // endif Use
if (Header) {
@ -1046,6 +1054,7 @@ bool TDBCSV::PrepareWriting(PGLOBAL g)
strcat(To_Line, sep);
if (Field[i])
{
if (!strlen(Field[i])) {
// Generally null fields are not quoted
if (Quoted > 2)
@ -1074,7 +1083,7 @@ bool TDBCSV::PrepareWriting(PGLOBAL g)
else
strcat(To_Line, Field[i]);
}
} // endfor i
#if defined(_DEBUG)
@ -1129,11 +1138,13 @@ int TDBCSV::CheckWrite(PGLOBAL g)
// Check whether record is too int
for (int i = 0; i < Fields; i++)
{
if (Field[i]) {
if (!(n = strlen(Field[i])))
n += (Quoted > 2 ? 2 : 0);
else if (strchr(Field[i], Sep) || (Qot && *Field[i] == Qot)
|| Quoted > 1 || (Quoted == 1 && !Fldtyp[i]))
{
if (!Qot) {
sprintf(g->Message, MSG(SEP_IN_FIELD), i + 1);
return -1;
@ -1146,14 +1157,14 @@ int TDBCSV::CheckWrite(PGLOBAL g)
n += 2; // Outside quotes
} // endif
}
if ((nlen += n) > maxlen) {
strcpy(g->Message, MSG(LINE_TOO_LONG));
return -1;
} // endif nlen
} // endif Field
}
return nlen;
} // end of CheckWrite

View File

@ -378,7 +378,7 @@ bool TDBJDBC::MakeInsert(PGLOBAL g)
int len = 0;
uint pos;
bool b = false;
PTABLE tablep = To_Table;
// PTABLE tablep = To_Table;
PCOL colp;
for (colp = Columns; colp; colp = colp->GetNext())
@ -582,11 +582,13 @@ bool TDBJDBC::OpenDB(PGLOBAL g)
if (Memory < 3) {
// Method will depend on cursor type
if ((Rbuf = Query ? Jcp->Rewind(Query->GetStr()) : 0) < 0)
{
if (Mode != MODE_READX) {
Jcp->Close();
return true;
} else
Rbuf = 0;
}
} else
Rbuf = Qrp->Nblin;
@ -1017,7 +1019,7 @@ JDBCCOL::JDBCCOL(JDBCCOL *col1, PTDB tdbp) : EXTCOL(col1, tdbp)
void JDBCCOL::ReadColumn(PGLOBAL g)
{
PTDBJDBC tdbp = (PTDBJDBC)To_Tdb;
int i = tdbp->Fpos - 1, n = tdbp->CurNum;
int i = tdbp->Fpos - 1;
if (tdbp->Memory == 3) {
// Get the value from the stored memory
@ -1137,8 +1139,6 @@ int TDBXJDC::GetMaxSize(PGLOBAL g)
/***********************************************************************/
bool TDBXJDC::OpenDB(PGLOBAL g)
{
bool rc = false;
if (trace(1))
htrc("JDBC OpenDB: tdbp=%p tdb=R%d use=%d mode=%d\n",
this, Tdb_No, Use, Mode);

View File

@ -255,11 +255,13 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL;
} else {
if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))
{
if (!mgo) {
sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty);
return 0;
} else
tdp->Lrecl = 8192; // Should be enough
}
tdp->Ending = GetIntegerTableOption(g, topt, "Ending", CRLF);
@ -1315,7 +1317,7 @@ bool JSONCOL::ParseJpath(PGLOBAL g)
{
char *p, *p1 = NULL, *p2 = NULL, *pbuf = NULL;
int i;
bool a, mul = false;
bool a;
if (Parsed)
return false; // Already done
@ -1545,7 +1547,6 @@ void JSONCOL::ReadColumn(PGLOBAL g)
PVAL JSONCOL::GetColumnValue(PGLOBAL g, PJSON row, int i)
{
int n = Nod - 1;
bool expd = false;
PJAR arp;
PJVAL val = NULL;
@ -2106,12 +2107,14 @@ int TDBJSON::Cardinality(PGLOBAL g)
if (!g)
return (Xcol || Multiple) ? 0 : 1;
else if (Cardinal < 0)
{
if (!Multiple) {
if (MakeDocument(g) == RC_OK)
Cardinal = Doc->size();
} else
return 10;
}
return Cardinal;
} // end of Cardinality

View File

@ -671,7 +671,7 @@ TDBDIR::TDBDIR(PSZ fpat) : TDBASE((PTABDEF)NULL)
/***********************************************************************/
char* TDBDIR::Path(PGLOBAL g)
{
PCATLG cat = PlgGetCatalog(g);
(void) PlgGetCatalog(g); // XXX Should be removed?
PTABDEF defp = (PTABDEF)To_Def;
#if defined(__WIN__)
@ -708,9 +708,9 @@ PCOL TDBDIR::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
int TDBDIR::GetMaxSize(PGLOBAL g)
{
if (MaxSize < 0) {
int rc, n = -1;
int n = -1;
#if defined(__WIN__)
int rc;
// Start searching files in the target directory.
hSearch = FindFirstFile(Path(g), &FileData);

View File

@ -246,7 +246,7 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url, bool b)
// Found that if the string is:
// user:@hostname:port/db/table
// Then password is a null string, so set to NULL
if ((pwd[0] == 0))
if (pwd[0] == 0)
Password = NULL;
else
Password = pwd;

View File

@ -112,7 +112,7 @@ bool user_connect::user_init()
if (g)
printf("%s\n", g->Message);
int rc= PlugExit(g);
(void) PlugExit(g);
g= NULL;
if (dup)

View File

@ -35,7 +35,7 @@
//typedef struct _global *PGLOBAL;
typedef class user_connect *PCONNECT;
typedef class ha_connect *PHC;
static int connect_done_func(void *);
int connect_done_func(void *);
/*****************************************************************************/
/* The CONNECT users. There should be one by connected users. */

View File

@ -1129,7 +1129,7 @@ void STRBLK::SetValues(PVBLK pv, int k, int n)
CheckType(pv)
PSZ *sp = ((STRBLK*)pv)->Strp;
for (register int i = k; i < n; i++)
for (int i = k; i < n; i++)
Strp[i] = (!pv->IsNull(i)) ? sp[i] : NULL;
} // end of SetValues