Fix a bug reported by Marco Cassiano and suppress some compiler warnings.
authorHiroshi Inoue <inoue@tpf.co.jp>
Tue, 17 Nov 2009 15:44:01 +0000 (15:44 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Tue, 17 Nov 2009 15:44:01 +0000 (15:44 +0000)
convert.c

index 6b5fab3fe887f6dd42f35e3f7aee9b334974d80d..5d8723c6483d691eb6b0bd87293a34c6c13c17ee 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -1099,7 +1099,7 @@ inolog("2stime fr=%d\n", std_time.fr);
                            for (i = 0, j = 0; ptr[i]; i++)
                                if (ptr[i] == '.')
                                {
-                                   strncpy_null(&new_string[j], lc->decimal_point, strlen(lc->decimal_point));
+                                   strncpy_null(&new_string[j], lc->decimal_point, cbValueMax - j);
                                    j += strlen(lc->decimal_point);
                                }
                                else
@@ -2902,7 +2902,7 @@ Int4 findIdentifier(const char *str, int ccsc, const char **nextdel)
            continue;
        if (sptr == str) /* the first character */
        {
-           if (dquote = (IDENTIFIER_QUOTE == tchar))
+           if (dquote = (IDENTIFIER_QUOTE == tchar), dquote)
                continue;
            if (!isalpha(tchar))
            {
@@ -3068,10 +3068,6 @@ inner_process_tokens(QueryParse *qp, QueryBuild *qb)
     */
    else if (oldchar == ODBC_ESCAPE_START)
    {
-       int npos = F_NewPos(qb);
-       BOOL    addsp = TRUE;
-       unsigned char   tchar;
-
        if (SQL_ERROR == convert_escape(qp, qb))
        {
            if (0 == qb->errornumber)