tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
377 stars 101 forks source link

master build warning against PostgreSQL 11 #184

Closed l-we closed 5 years ago

l-we commented 5 years ago

src/options.c:400:13: warning: variable 'msg_handler_test' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (strcmp(option_set->msg_handler, "blackhole") == 0) ^~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/string2.h:108:3: note: expanded from macro 'strcmp' extension \ ^ src/options.c:405:9: note: uninitialized use occurs here if (!msg_handler_test) ^~~~ src/options.c:400:9: note: remove the 'if' if its condition is always true else if (strcmp(option_set->msg_handler, "blackhole") == 0) ^~~~~~~~~~~~~~ src/options.c:385:24: note: initialize the variable 'msg_handler_test' to silence this warning int msg_handler_test; ^ = 0 1 warning generated.

juliogonzalez commented 5 years ago

@l-we I can't reproduce this neither on CentOS6 or Ubuntu 14.04:

https://jenkins.juliogonzalez.es/job/tds_fdw-build/1141/

Could you share details about OS, FreeTDS version, commands used to compile, etc?

l-we commented 5 years ago

Debian 9 freetds-common (0.91-6.1)。 freetds-dev (0.91-6.1+b4)。 libsybdb5 (0.91-6.1+b4)。

BINDIR = /home/psql/11/bin
DOCDIR = /home/psql/11/share/doc/postgresql
HTMLDIR = /home/psql/11/share/doc/postgresql
INCLUDEDIR = /home/psql/11/include
PKGINCLUDEDIR = /home/psql/11/include/postgresql
INCLUDEDIR-SERVER = /home/psql/11/include/postgresql/server
LIBDIR = /home/psql/11/lib
PKGLIBDIR = /home/psql/11/lib/postgresql
LOCALEDIR = /home/psql/11/share/locale
MANDIR = /home/psql/11/share/man
SHAREDIR = /home/psql/11/share/postgresql
SYSCONFDIR = /home/psql/11/etc/postgresql
PGXS = /home/psql/11/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/home/psql/11' '--enable-nls=zh_CN' '--with-segsize=64' '--with-blocksize=32' '--with-wal-blocksize=64' '--with-llvm' 'CC=/usr/bin/clang-8' 'CFLAGS=-O2 -fstrict-enums -fno-signed-zeros' 'LLVM_CONFIG=/usr/bin/llvm-config-8' 'CLANG=/usr/bin/clang-8'
CC = /usr/bin/clang-8
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -fstrict-enums -fno-signed-zeros
CFLAGS_SL = -fPIC
LDFLAGS = -L/usr/lib/llvm-8/lib -Wl,--as-needed -Wl,-rpath,'/home/psql/11/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lpthread -lz -lreadline -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 11.1
GeoffMontee commented 5 years ago

If PR #190 solved this problem, please let us know if we can close this issue.