On Wed, Jul 03, 2024 at 12:32:08PM +0000, Matthias Klose wrote: > ldapvi.c: In function ‘copy_sasl_output’: > ldapvi.c:1468:37: error: ‘return’ with no value, in function returning > non-void [-Wreturn-mismatch] > 1468 | if (lstat(sasl, &st) == -1) return; > | ^~~~~~
Given that the fix for this was fairly obvious (return 0 to actually return an int from the function when the file isn't found) and the package already got removed from trixie because of this bug, I uploaded an NMU to DELAYED/0-day. nmudiff is attached. Kind regards Philipp Kern
diff -Nru ldapvi-1.7/debian/changelog ldapvi-1.7/debian/changelog --- ldapvi-1.7/debian/changelog 2024-04-26 17:15:30.000000000 +0200 +++ ldapvi-1.7/debian/changelog 2024-10-01 16:39:15.000000000 +0200 @@ -1,3 +1,11 @@ +ldapvi (1.7-11.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix compilation with gcc-14 by returning 0 explicitly when lstat + returns an error. (Closes: #1075132) + + -- Philipp Kern <pk...@debian.org> Tue, 01 Oct 2024 16:39:15 +0200 + ldapvi (1.7-11) unstable; urgency=medium * Non-maintainer upload. diff -Nru ldapvi-1.7/debian/patches/09_return-0-on-lstat-failure.patch ldapvi-1.7/debian/patches/09_return-0-on-lstat-failure.patch --- ldapvi-1.7/debian/patches/09_return-0-on-lstat-failure.patch 1970-01-01 01:00:00.000000000 +0100 +++ ldapvi-1.7/debian/patches/09_return-0-on-lstat-failure.patch 2024-10-01 16:39:15.000000000 +0200 @@ -0,0 +1,21 @@ +From: Philipp Kern <pk...@debian.org> +Subject: Return 0 when the SASL file does not exist + +gcc-14 requires that functions that return an int actually do so, so the +bare "return" is no longer legit. + +Bug-Debian: https://bugs.debian.org/1075132 + +Index: ldapvi-1.7/ldapvi.c +=================================================================== +--- ldapvi-1.7.orig/ldapvi.c ++++ ldapvi-1.7/ldapvi.c +@@ -1465,7 +1465,7 @@ copy_sasl_output(FILE *out, char *sasl) + int line = 0; + int c; + +- if (lstat(sasl, &st) == -1) return; ++ if (lstat(sasl, &st) == -1) return 0; + if ( !(in = fopen(sasl, "r"))) syserr(); + + if (st.st_size > 0) { diff -Nru ldapvi-1.7/debian/patches/series ldapvi-1.7/debian/patches/series --- ldapvi-1.7/debian/patches/series 2024-04-26 17:15:30.000000000 +0200 +++ ldapvi-1.7/debian/patches/series 2024-10-01 16:39:15.000000000 +0200 @@ -6,3 +6,4 @@ 06_fix-vim-modeline 07_diff.c-Use-public-interface-ldap_bv2dn-instead-of-ld.patch 08_ftbfs-implicit-function-declaration.patch +09_return-0-on-lstat-failure.patch