pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedIncorrect return clause in regression test positioned-update causing compilation error
2+ messages / 2 participants
[nested] [flat]
* Incorrect return clause in regression test positioned-update causing compilation error
@ 2014-03-06 07:46 Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Michael Paquier @ 2014-03-06 07:46 UTC (permalink / raw)
To: pgsql-odbc
Hi all,
I found that the regression test positioned-update does not compile
correctly on OSX because of a "return" used in main() instead of a
plain exit().
Patch attached fixes that.
Regards,
--
Michael
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
20140306_odbc_regress_fix.patch (text/plain, 529B) download
*** a/test/src/positioned-update-test.c
--- b/test/src/positioned-update-test.c
***************
*** 67,73 **** int main(int argc, char **argv)
if (!SQL_SUCCEEDED(rc))
{
print_diag("SQLGetData failed", SQL_HANDLE_STMT, hstmt);
! return;
}
if (ind == SQL_NULL_DATA)
strcpy(buf, "NULL");
--- 67,73 ----
if (!SQL_SUCCEEDED(rc))
{
print_diag("SQLGetData failed", SQL_HANDLE_STMT, hstmt);
! exit(1);
}
if (ind == SQL_NULL_DATA)
strcpy(buf, "NULL");
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Incorrect return clause in regression test positioned-update causing compilation error
@ 2014-03-06 11:47 Heikki Linnakangas <hlinnakangas@vmware.com>
parent: Michael Paquier <michael.paquier@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2014-03-06 11:47 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc
On 03/06/2014 09:46 AM, Michael Paquier wrote:
> Hi all,
>
> I found that the regression test positioned-update does not compile
> correctly on OSX because of a "return" used in main() instead of a
> plain exit().
> Patch attached fixes that.
Thanks, committed.
I wonder why other compilers haven't warned about that; the "return"
statement didn't return a value, even though the main() function was
declared to return an "int".
- 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:[~2014-03-06 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06 07:46 Incorrect return clause in regression test positioned-update causing compilation error Michael Paquier <michael.paquier@gmail.com>
2014-03-06 11:47 ` 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