Thread: ecpg warning

ecpg warning

From
Bruce Momjian
Date:
Michael, I am seeing this ecpg warning:

    informix.c:290: warning: `nres' might be used uninitialized in
    this function

Can we initialize it to NULL to suppress the warning?  Also, I fixed a
typo where you had ;; instead of ; as a statement terminator.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: ecpg warning

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Michael, I am seeing this ecpg warning:
>     informix.c:290: warning: `nres' might be used uninitialized in
>     this function

> Can we initialize it to NULL to suppress the warning?

I believe the compiler has correctly identified a bug here; initializing
to NULL will just result in a guaranteed crash.

            regards, tom lane