Re: [HACKERS] compiler warning read_objtype_from_string()

2016-09-28 Thread Alvaro Herrera
Tom Lane wrote: > I do not think you should assume that the compiler is smart enough to > deduce that, nor that all compilers even know ereport(ERROR) doesn't > return. Personally I don't see the point of the "type" variable at > all, anyway. I would have written this as > > [code] Makes

Re: [HACKERS] compiler warning read_objtype_from_string()

2016-09-28 Thread Tom Lane
Alvaro Herrera writes: > Peter Eisentraut wrote: >> I'm getting the following compiler warning (using nondefault >> optimization options): >> objectaddress.c: In function 'read_objtype_from_string': >> objectaddress.c:2309:9: error: 'type' may be used uninitialized in

Re: [HACKERS] compiler warning read_objtype_from_string()

2016-09-28 Thread Alvaro Herrera
Peter Eisentraut wrote: > I'm getting the following compiler warning (using nondefault > optimization options): > > objectaddress.c: In function 'read_objtype_from_string': > objectaddress.c:2309:9: error: 'type' may be used uninitialized in this > function [-Werror=maybe-uninitialized] >

[HACKERS] compiler warning read_objtype_from_string()

2016-09-28 Thread Peter Eisentraut
I'm getting the following compiler warning (using nondefault optimization options): objectaddress.c: In function 'read_objtype_from_string': objectaddress.c:2309:9: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized] return type; The comment for the function