pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
src/test/dataatexecution-test.c: VOID undeclared
2+ messages / 2 participants
[nested] [flat]

* src/test/dataatexecution-test.c: VOID undeclared
@ 2013-11-01 22:39  Christoph Berg <myon@debian.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Christoph Berg @ 2013-11-01 22:39 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

the testsuite doesn't compile here:

gcc -Wno-pointer-sign src/dataatexecution-test.c src/common.o -o src/dataatexecution-test -lodbc
src/dataatexecution-test.c: In function ‘main’:
src/dataatexecution-test.c:55:10: error: ‘VOID’ 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 reported only once for each function it appears in
src/dataatexecution-test.c:55:16: error: expected expression before ‘)’ token
         (VOID *) 1, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:58:9: error: too few arguments to function ‘SQLBindParameter’
         &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 ‘)’ token
         (VOID *) 2, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:69:9: error: too few arguments to function ‘SQLBindParameter’
         &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 ‘)’ token
    if (paramid == (VOID *) 1)
                          ^
src/dataatexecution-test.c:86:31: error: expected expression before ‘)’ token
    else if (paramid == (VOID *) 2)
                               ^
src/dataatexecution-test.c:129:16: error: expected expression before ‘)’ token
         (VOID *) 1, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:132:9: error: too few arguments to function ‘SQLBindParameter’
         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
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachments:

testsuite2 (text/plain, 1.7K) download --- 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, &paramid)) == 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 */);
signature.asc (application/pgp-signature, 835B) download ^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: src/test/dataatexecution-test.c: VOID undeclared
@ 2013-11-03 08:33  Heikki Linnakangas <hlinnakangas@vmware.com>
  parent: Christoph Berg <myon@debian.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2013-11-03 08:33 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; pgsql-odbc

On 02.11.2013 00:39, Christoph Berg wrote:
> Hi,
>
> the testsuite doesn't compile here:
>
> ...
>
> The attached patch fixes the problem.

Thanks, applied.

- Heikki


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-11-03 08:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 22:39 src/test/dataatexecution-test.c: VOID undeclared Christoph Berg <myon@debian.org>
2013-11-03 08:33 ` Heikki Linnakangas <hlinnakangas@vmware.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox