Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcNNq-0005dt-51 for pgsql-odbc@arkaria.postgresql.org; Fri, 01 Nov 2013 22:40:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VcNNp-0006pW-3n for pgsql-odbc@arkaria.postgresql.org; Fri, 01 Nov 2013 22:40:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcNNo-0006pP-46 for pgsql-odbc@postgresql.org; Fri, 01 Nov 2013 22:40:00 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcNNk-0005a1-FT for pgsql-odbc@postgresql.org; Fri, 01 Nov 2013 22:39:59 +0000 Received: from msgid.df7cb.de (kref-4d090b4e.pool.mediaWays.net [77.9.11.78]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 1D5606967B for ; Fri, 1 Nov 2013 23:39:55 +0100 (CET) Date: Fri, 1 Nov 2013 23:39:54 +0100 From: Christoph Berg To: pgsql-odbc@postgresql.org Subject: src/test/dataatexecution-test.c: VOID undeclared Message-ID: <20131101223954.GF7298@msgid.df7cb.de> Mail-Followup-To: Christoph Berg , pgsql-odbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KJY2Ze80yH5MUxol" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --KJY2Ze80yH5MUxol Content-Type: multipart/mixed; boundary="mR8QP4gmHujQHb1c" Content-Disposition: inline --mR8QP4gmHujQHb1c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, the testsuite doesn't compile here: gcc -Wno-pointer-sign src/dataatexecution-test.c src/common.o -o src/dataat= execution-test -lodbc src/dataatexecution-test.c: In function =E2=80=98main=E2=80=99: src/dataatexecution-test.c:55:10: error: =E2=80=98VOID=E2=80=99 undeclared = (first use in this function) (VOID *) 1, /* param value ptr. For a data-at-exec ^ src/dataatexecution-test.c:55:10: note: each undeclared identifier is repor= ted only once for each function it appears in src/dataatexecution-test.c:55:16: error: expected expression before =E2=80= =98)=E2=80=99 token (VOID *) 1, /* param value ptr. For a data-at-exec ^ src/dataatexecution-test.c:58:9: error: too few arguments to function =E2= =80=98SQLBindParameter=E2=80=99 &cbParam1 /* StrLen_or_IndPtr */); ^ In file included from src/common.h:10:0, from src/dataatexecution-test.c:5: /usr/include/sqlext.h:2022:19: note: declared here SQLRETURN SQL_API SQLBindParameter( ^ src/dataatexecution-test.c:66:16: error: expected expression before =E2=80= =98)=E2=80=99 token (VOID *) 2, /* param value ptr. For a data-at-exec ^ src/dataatexecution-test.c:69:9: error: too few arguments to function =E2= =80=98SQLBindParameter=E2=80=99 &cbParam2 /* StrLen_or_IndPtr */); ^ In file included from src/common.h:10:0, from src/dataatexecution-test.c:5: /usr/include/sqlext.h:2022:19: note: declared here SQLRETURN SQL_API SQLBindParameter( ^ src/dataatexecution-test.c:81:26: error: expected expression before =E2=80= =98)=E2=80=99 token if (paramid =3D=3D (VOID *) 1) ^ src/dataatexecution-test.c:86:31: error: expected expression before =E2=80= =98)=E2=80=99 token else if (paramid =3D=3D (VOID *) 2) ^ src/dataatexecution-test.c:129:16: error: expected expression before =E2=80= =98)=E2=80=99 token (VOID *) 1, /* param value ptr. For a data-at-exec ^ src/dataatexecution-test.c:132:9: error: too few arguments to function =E2= =80=98SQLBindParameter=E2=80=99 str_ind_array /* StrLen_or_IndPtr */); ^ In file included from src/common.h:10:0, from src/dataatexecution-test.c:5: /usr/include/sqlext.h:2022:19: note: declared here SQLRETURN SQL_API SQLBindParameter( ^ make[1]: *** [src/dataatexecution-test] Fehler 1 make[1]: Leaving directory `/home/myon/psqlodbc-09.02.0100/test' The attached patch fixes the problem. Christoph --=20 cb@df7cb.de | http://www.df7cb.de/ --mR8QP4gmHujQHb1c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=testsuite2 --- a/test/src/dataatexecution-test.c +++ b/test/src/dataatexecution-test.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ param1bytes, /* column size */ 0, /* dec digits */ - (VOID *) 1, /* param value ptr. For a data-at-exec + (void *) 1, /* param value ptr. For a data-at-exec * param, this is a "parameter id" */ 0, /* buffer len */ &cbParam1 /* StrLen_or_IndPtr */); @@ -63,7 +63,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ param2bytes, /* column size */ 0, /* dec digits */ - (VOID *) 2, /* param value ptr. For a data-at-exec + (void *) 2, /* param value ptr. For a data-at-exec * param, this is a "parameter id" */ 0, /* buffer len */ &cbParam2 /* StrLen_or_IndPtr */); @@ -78,12 +78,12 @@ int main(int argc, char **argv) paramid = 0; while ((rc = SQLParamData(hstmt, ¶mid)) == SQL_NEED_DATA) { - if (paramid == (VOID *) 1) + if (paramid == (void *) 1) { rc = SQLPutData(hstmt, param1, param1bytes); CHECK_STMT_RESULT(rc, "SQLPutData failed", hstmt); } - else if (paramid == (VOID *) 2) + else if (paramid == (void *) 2) { rc = SQLPutData(hstmt, param2, param2bytes); CHECK_STMT_RESULT(rc, "SQLPutData failed", hstmt); @@ -126,7 +126,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ 5, /* column size */ 0, /* dec digits */ - (VOID *) 1, /* param value ptr. For a data-at-exec + (void *) 1, /* param value ptr. For a data-at-exec * param, this is "parameter id" */ 0, /* buffer len */ str_ind_array /* StrLen_or_IndPtr */); --mR8QP4gmHujQHb1c-- --KJY2Ze80yH5MUxol Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBCAAGBQJSdC25AAoJEExaa6sS0qeu35AP/RR5fkmstpRIK+VJY5nBiOQA W6CIE24MMLB0Rps5l+eUOdSW8rPNNei/KBcz18f5KXVVFckeFSaEm564wZWLigK0 V1/Asibi2PFUAW2utCQCMA1dwF58vLw322N2JtVtIBvykrG84ZhrTkZBzrelda+S TAlZa2vP9KhlhV8tDd1Z152+InS705dRRKYfC4JBJ4+ZM7BrKV73btTEUr8gsRCo aLfzHL6R2/rlSEcCpE0SJMCFueJiTX11Psjz/ipbqPyyFQ6xdZDyg2Y4VCNBkAA0 /CNi7GuPPtGZSIzPA/hFe7QfKJjZHg1qVUculQzEnxzNRwulaQ2RZXZSdf6RZD2u l22Dlt91FpkEomt8gLiCCLV0Oh7etWzlUuDioCel4g4qOCDB1Mcc8RKHYI7T+tzC 30XwEn3B6fgM9XJl+zK1+QR5n1wEuDjdB2hy/xKu0k8Rbnjx2AP1ndDnFmTygWw7 JFWkNFaDqbUDvkPwmQ2ZQtaVMqh+2qkt0bdqjAzzOWmyr4OOSnk7p2uEX8J07suD NU8y5tiXB8+4YwR4Rcu2xSJYyW/WvGopkmIqYrFzvrcDpWfDaNCllVgGD5RKD1Ll T6ro8uEjFUICPNhFpJNRMdGdYEOep13Jt1dQj1krU3qK8TFWjhs3geKzWx0zyl5I 7syrClYkK023pNBEfmhj =j+My -----END PGP SIGNATURE----- --KJY2Ze80yH5MUxol--