Suppress some compiler warnings.
authorHiroshi Inoue <inoue@tpf.co.jp>
Mon, 22 Sep 2008 12:42:02 +0000 (12:42 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Mon, 22 Sep 2008 12:42:02 +0000 (12:42 +0000)
connection.c
dlg_specific.c
info.c
parse.c

index 0201518e2e5587d231848e7ee92edac131a1cd15..56454af51ed9415bc8ce838afa4cefd7b09395d3 100644 (file)
@@ -2062,7 +2062,7 @@ CC_create_errormsg(ConnectionClass *self)
    }
 
    mylog("exit CC_create_errormsg\n");
-   return msg ? strdup(msg) : NULL;
+   return strdup(msg);
 }
 
 
index 092f659eb212fc94f0d02597e6262630b04ad28c..2d18913f1bb3f1ff0b7c3ccd7743f80f28d80570 100644 (file)
@@ -890,11 +890,11 @@ getDSNinfo(ConnInfo *ci, char overwrite)
 
    if (get_qlog())
    {
-       UCHAR   *enc = check_client_encoding(ci->conn_settings);
+       char    *enc = (char *) check_client_encoding(ci->conn_settings);
 
-       qlog("          conn_settings='%s',conn_encoding='%s'\n",
-           ci->conn_settings, enc ? enc : (UCHAR *)"(null)");
-       if (enc)
+       qlog("          conn_settings='%s', conn_encoding='%s'\n", ci->conn_settings,
+           NULL != enc ? enc : "(null)");
+       if (NULL != enc)
            free(enc);
        qlog("          translation_dll='%s',translation_option='%s'\n",
            ci->translation_dll,
@@ -912,7 +912,7 @@ writeDriverCommoninfo(const char *fileName, const char *sectionName,
    char        tmp[128];
    int     errc = 0;
 
-   if (ODBCINST_INI == fileName && NULL == sectionName)
+   if (stricmp(ODBCINST_INI, fileName) == 0 && NULL == sectionName)
        sectionName = DBMS_NAME;
  
    sprintf(tmp, "%d", comval->commlog);
diff --git a/info.c b/info.c
index 0376ebd94c39da86576ee6f22afda8fa88848364..be739513bd59b52446dd51fb7468fb74a5ea6dc9 100644 (file)
--- a/info.c
+++ b/info.c
@@ -1916,7 +1916,7 @@ retry_public_schema:
            if (list_some)
                set_tuplefield_null(&tuple[TABLES_TABLE_NAME]);
            else
-               set_nullfield_string(&tuple[TABLES_TABLE_NAME], table_name);
+               set_tuplefield_string(&tuple[TABLES_TABLE_NAME], table_name);
            if (list_table_types || !list_some)
                set_tuplefield_string(&tuple[TABLES_TABLE_TYPE], systable ? "SYSTEM TABLE" : (view ? "VIEW" : "TABLE"));
            else
diff --git a/parse.c b/parse.c
index fdede502a689cac3b95e0b9560672029babf7bfa..77dad111c3914fd3497e11c46d832e6727216c0a 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -1175,7 +1175,7 @@ parse_the_statement(StatementClass *stmt, BOOL check_hasoids, BOOL sqlsvr_check)
 
    delim = '\0';
    token[0] = '\0';
-   while (pptr = ptr, (delim != ',') ? strcpy(btoken, token) : (char *) (btoken[0] = '\0'), (ptr = getNextToken(conn->ccsc, CC_get_escape(conn), pptr, token, sizeof(token), &delim, &quote, &dquote, &numeric)) != NULL)
+   while (pptr = ptr, (delim != ',') ? strcpy(btoken, token) : (btoken[0] = '\0', NULL), (ptr = getNextToken(conn->ccsc, CC_get_escape(conn), pptr, token, sizeof(token), &delim, &quote, &dquote, &numeric)) != NULL)
    {
        unquoted = !(quote || dquote);