From d57112cbb560e8fd0c88d8a00f23226e6096bb66 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 14 Nov 2010 22:13:37 -0800 Subject: [PATCH] perl-module: Fix return value of append_case subroutine. The casewriter_write() function does not have a return value (it is declared as "void"), but the append_case subroutine tried to use its return value anyway. This cannot work properly, of course, and in fact caused problems on 64-bit builds in particular. I don't know why there is no C compiler warning about this problem. I guess the Perl module build must somehow turn off a lot of GCC warnings. Reported by bojo42 in bug #31611. --- perl-module/PSPP.xs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-module/PSPP.xs b/perl-module/PSPP.xs index a95ccf63..25effb92 100644 --- a/perl-module/PSPP.xs +++ b/perl-module/PSPP.xs @@ -685,7 +685,8 @@ CODE: union value *val = case_data_rw (c, v); value_set_missing (val, var_get_width (v)); } - RETVAL = casewriter_write (sfi->writer, c); + casewriter_write (sfi->writer, c); + RETVAL = 1; finish: free (vv); OUTPUT: -- 2.30.2