On 2023-06-26 Mo 07:20, jian he wrote:
static
Datum return_numeric_datum(char *token)
{
     Datum   numd;
     Node    *escontext;

     if (!DirectInputFunctionCallSafe(numeric_in, token,
                                     InvalidOid, -1,
                                     escontext,
                                     &numd));
         elog(INFO,"something is wrong");
     return numd;
}


To start with, the semicolon at the end of that if appears bogus. The elog is indented to look like it's conditioned by the if but the semicolon makes it not be.

There are compiler switches in modern gcc at least that help you detect things like this.


cheers


andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

Reply via email to