trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1241: [TRAFODION-2750] Using function strt...
Date Thu, 21 Sep 2017 20:29:34 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1241#discussion_r140350755
  
    --- Diff: core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp ---
    @@ -3545,7 +3545,7 @@ unsigned long ODBC::ConvertCharToNumeric(SQLPOINTER srcDataPtr,
         rTrim(cTmpBuf);
         tempLen = strlen(cTmpBuf);
         errno = 0;
    -	dTmp = strtod(cTmpBuf, &errorCharPtr);
    +	dTmp = strtold(cTmpBuf, &errorCharPtr);
    --- End diff --
    
    This looks innocuous, but strlod return long double which is 16 byte.  This 16 byte is
assigned to 8 byte double dTmp. I am not sure if there is an implicit casting to double from
long double can work as expected. 


---

Mime
View raw message