Fix some misc issues pointed out by clang's static analyzer, scan-build.
Mostly dead assignments.
goto cleanup;
}
SC_forget_unnamed(stmt);
- buildPrepareStatement = FALSE;
if (ci->disallow_premature)
prepare_dummy_cursor = stmt->pre_executing;
SQLLEN paramlen;
int pidx;
- for (prtlen = 0, mapptr = mapExpr; *mapptr; mapptr++)
+ for (mapptr = mapExpr; *mapptr; mapptr++)
{
if (*mapptr != '$')
{
{
char abbrevmode[sizeof(ci->sslmode)];
- olen = snprintf(&connect_string[hlen], nlen, ";"
+ (void) snprintf(&connect_string[hlen], nlen, ";"
ABBR_SSLMODE "=%s", abbrev_sslmode(ci->sslmode, abbrevmode));
}
hlen = strlen(connect_string);
LPARAM lParam);
#endif /* WIN32 */
-void updateGlobals(void);
int writeDriverCommoninfo(const char *fileName, const char *sectionName,
const GLOBAL_VALUES *);
void writeDSNinfo(const ConnInfo *ci);
int getDriverNameFromDSN(const char *dsn, char *driver_name, int namelen);
int getLogDir(char *dir, int dirmax);
int setLogDir(const char *dir);
-int changeDriverNameOfaDSN(const char *dsn, const char *driver_name, DWORD *errcode);
UInt4 getExtraOptions(const ConnInfo *);
BOOL setExtraOptions(ConnInfo *, const char *str, const char *format);
char *extract_extra_attribute_setting(const pgNAME setting, const char *attr);
/* Check for data at execution parameters */
if (apdopts->parameters[i].data_at_exec)
{
- mylog("The %dth parameter of %d-row is data at exec(%d)\n", i, current_row, *pcVal);
+ mylog("The %dth parameter of %d-row is data at exec(%d)\n", i, current_row, pcVal ? (*pcVal) : -1);
if (stmt->data_at_exec < 0)
stmt->data_at_exec = 1;
else
ParameterInfoClass *current_param;
ParameterImplClass *current_iparam;
PutDataClass *current_pdata;
- char *buffer, *putbuf, *allocbuf = NULL;
+ char *putbuf, *allocbuf = NULL;
Int2 ctype;
SQLLEN putlen;
BOOL lenset = FALSE, handling_lo = FALSE;
}
else
{
- buffer = current_pdata->EXEC_buffer;
old_pos = *current_pdata->EXEC_used;
if (putlen > 0)
{
- SQLLEN used = *current_pdata->EXEC_used + putlen, allocsize;
+ SQLLEN used = *current_pdata->EXEC_used + putlen;
+ SQLLEN allocsize;
+ char *buffer;
+
for (allocsize = (1 << 4); allocsize <= used; allocsize <<= 1) ;
mylog(" cbValue = %d, old_pos = %d, *used = %d\n", putlen, old_pos, used);
case SQL_INDEX_KEYWORDS:
len = 4;
value = SQL_IK_NONE;
+ break;
case SQL_INFO_SCHEMA_VIEWS:
len = 4;
value = 0;
rollbps = rollbp = res->rb_count;
for (i = 0, doubtp = 0; i < res->rb_count; i++)
{
- index = rollback[i].index;
keys.blocknum = rollback[i].blocknum;
keys.offset = rollback[i].offset;
texist = tupleExists(stmt, &keys);
if (0 != oid)
poid = &oid;
- qret = SQL_NO_DATA_FOUND;
if (NULL != tres->backend_tuples &&
1 == QR_get_num_cached_tuples(tres))