Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libgsm for openSUSE:Factory checked in at 2026-03-29 20:00:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgsm (Old) and /work/SRC/openSUSE:Factory/.libgsm.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgsm" Sun Mar 29 20:00:24 2026 rev:31 rq:1343295 version:1.0.24 Changes: -------- --- /work/SRC/openSUSE:Factory/libgsm/libgsm.changes 2024-03-03 20:19:48.542889135 +0100 +++ /work/SRC/openSUSE:Factory/.libgsm.new.8177/libgsm.changes 2026-03-29 20:00:28.124879448 +0200 @@ -1,0 +2,15 @@ +Mon Mar 23 19:41:17 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 1.0.24 + * Left-shifting negative signed integers is undefined behavior as + per the C standard; so let's not do that. +- Update to version 1.0.23 + * Declare signal handlers as accepting an int; sometimes, gcc + cares. + * Also, write &"s"[x == 1] instead of "s" + (x == 1) to pluralize + (pointer arithmetic on arrays is so rare as to elicit compiler + warnings in some settings); and why didn't + toast_lin.c:linear_input() have a P1 proto macro like + linear_output()? + +------------------------------------------------------------------- Old: ---- gsm-1.0.22.tar.gz New: ---- gsm-1.0.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgsm.spec ++++++ --- /var/tmp/diff_new_pack.Ms9u8m/_old 2026-03-29 20:00:28.588898566 +0200 +++ /var/tmp/diff_new_pack.Ms9u8m/_new 2026-03-29 20:00:28.592898730 +0200 @@ -1,7 +1,7 @@ # # spec file for package libgsm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,9 @@ %define _name gsm -%define _version 1.0-pl22 +%define _version 1.0-pl24 Name: libgsm -Version: 1.0.22 +Version: 1.0.24 Release: 0 Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities License: ISC ++++++ gsm-1.0.22.tar.gz -> gsm-1.0.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/ChangeLog new/gsm-1.0-pl24/ChangeLog --- old/gsm-1.0-pl22/ChangeLog 2022-08-04 20:48:33.715815841 +0200 +++ new/gsm-1.0-pl24/ChangeLog 2026-03-07 04:38:06.000000000 +0100 @@ -1,3 +1,26 @@ +Fri Mar 6 07:16:24 2026 Jutta Degener ([email protected]) + + * Release 1.0 Patchlevel 24 + Left-shifting negative signed integers is undefined behavior as per + the C standard; so let's not do that. + Thanks to Nanang Izzuddin <[email protected]> for an exhaustive list + of places where we definitely did do that, and for the patience to + wait until I managed to Actually Read What the C99 Standard Says, + rather than what I _want_ it to say. + Also, don't forget the P0() and the void and int return types in a few + places of the test code. + +Sun Aug 31 20:25:13 2025 Jutta Degener ([email protected]) + + * Release 1.0 Patchlevel 23 + Declare signal handlers as accepting an int; sometimes, gcc cares. + (Thanks to Thomas Petazzoni <[email protected]> + for the patch; errors are mine.) + Also, write &"s"[x == 1] instead of "s" + (x == 1) to pluralize + (pointer arithmetic on arrays is so rare as to elicit compiler warnings + in some settings); and why didn't toast_lin.c:linear_input() have a + P1 proto macro like linear_output()? + Thu Aug 4 18:47:10 2022 Jutta Degener ([email protected]) * Release 1.0 Patchlevel 22 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/add-test/add_test.c new/gsm-1.0-pl24/add-test/add_test.c --- old/gsm-1.0-pl22/add-test/add_test.c 2022-07-31 18:16:42.983313021 +0200 +++ new/gsm-1.0-pl24/add-test/add_test.c 2026-03-07 03:58:36.000000000 +0100 @@ -34,7 +34,7 @@ longword M_gsm_L_mult P((word op1, word op2)); longword M_gsm_L_add P((longword op1, longword op2)); -void help() +void help P0() { puts( " add a b sub a b mult a b div a b" ); puts( "L_add A B L_sub A B L_mult A B mult_r a b" ); @@ -180,7 +180,7 @@ } else if (interactive) putchar('\n'); } -int main(ac, av) char ** av; +int main P2((ac, av), int ac, char ** av) { char buf[299]; char * c; @@ -310,6 +310,7 @@ } help(); } + return 0; } #include "private.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/inc/gsm.h new/gsm-1.0-pl24/inc/gsm.h --- old/gsm-1.0-pl22/inc/gsm.h 2022-08-04 20:46:27.715815841 +0200 +++ new/gsm-1.0-pl24/inc/gsm.h 2026-03-06 16:21:19.000000000 +0100 @@ -47,7 +47,7 @@ #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */ -#define GSM_PATCHLEVEL 22 +#define GSM_PATCHLEVEL 24 #define GSM_MINOR 0 #define GSM_MAJOR 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/inc/private.h new/gsm-1.0-pl24/inc/private.h --- old/gsm-1.0-pl22/inc/private.h 2022-07-31 18:16:42.727313021 +0200 +++ new/gsm-1.0-pl24/inc/private.h 2026-03-07 04:21:28.000000000 +0100 @@ -59,6 +59,13 @@ #define SASR(x, by) ((x) >= 0 ? (x) >> (by) : (~(-((x) + 1) >> (by)))) #endif /* SASR */ +#ifdef SASL /* flag: it's safe to left-shift negative signed values */ +#undef SASL +#define SASL(x, by) ((x) << (by)) +#else +#define SASL(x, by) ((x) * (1 << (by))) +#endif + #include "proto.h" /* @@ -101,7 +108,7 @@ (SASR( ((longword)(a) * (longword)(b)), 15 )) # define GSM_L_MULT(a, b) /* word a, word b */ \ - (((longword)(a) * (longword)(b)) << 1) + (SASL(((longword)(a) * (longword)(b)), 1)) # define GSM_L_ADD(a, b) \ ( (a) < 0 ? ( (b) >= 0 ? (a) + (b) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/add.c new/gsm-1.0-pl24/src/add.c --- old/gsm-1.0-pl22/src/add.c 2022-07-31 18:16:42.843313021 +0200 +++ new/gsm-1.0-pl24/src/add.c 2026-03-06 16:49:08.000000000 +0100 @@ -56,7 +56,7 @@ longword gsm_L_mult P2((a,b),word a, word b) { assert( a != MIN_WORD || b != MIN_WORD ); - return ((longword)a * (longword)b) << 1; + return SASL((longword)a * (longword)b, 1); } longword gsm_L_add P2((a,b), longword a, longword b) @@ -155,7 +155,7 @@ if (n >= 32) return 0; if (n <= -32) return -(a < 0); if (n < 0) return gsm_L_asr(a, -n); - return a << n; + return SASL(a, n); } word gsm_asl P2((a,n), word a, int n) @@ -163,14 +163,14 @@ if (n >= 16) return 0; if (n <= -16) return -(a < 0); if (n < 0) return gsm_asr(a, -n); - return a << n; + return SASL(a, n); } longword gsm_L_asr P2((a,n), longword a, int n) { if (n >= 32) return -(a < 0); if (n <= -32) return 0; - if (n < 0) return a << -n; + if (n < 0) return SASL(a, -n); # ifdef SASR return a >> n; @@ -184,7 +184,7 @@ { if (n >= 16) return -(a < 0); if (n <= -16) return 0; - if (n < 0) return a << -n; + if (n < 0) return SASL(a, -n); # ifdef SASR return a >> n; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/code.c new/gsm-1.0-pl24/src/code.c --- old/gsm-1.0-pl22/src/code.c 2022-07-31 18:16:42.927313021 +0200 +++ new/gsm-1.0-pl24/src/code.c 2026-03-07 04:20:35.000000000 +0100 @@ -90,7 +90,6 @@ } dp += 40; dpp += 40; - } (void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160), 120 * sizeof(*S->dp0) ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/gsm_encode.c new/gsm-1.0-pl24/src/gsm_encode.c --- old/gsm-1.0-pl22/src/gsm_encode.c 2022-07-31 18:16:42.823313021 +0200 +++ new/gsm-1.0-pl24/src/gsm_encode.c 2026-03-07 04:20:21.000000000 +0100 @@ -13,7 +13,6 @@ void gsm_encode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c) { word LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4]; - Gsm_Coder(s, source, LARc, Nc, bc, Mc, xmaxc, xmc); @@ -345,7 +344,6 @@ #endif /* WAV49 */ { - *c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */ | ((LARc[0] >> 2) & 0xF); *c++ = ((LARc[0] & 0x3) << 6) @@ -446,6 +444,5 @@ *c++ = ((xmc[49] & 0x3) << 6) | ((xmc[50] & 0x7) << 3) | (xmc[51] & 0x7); - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/lpc.c new/gsm-1.0-pl24/src/lpc.c --- old/gsm-1.0-pl22/src/lpc.c 2022-07-31 18:16:42.819313021 +0200 +++ new/gsm-1.0-pl24/src/lpc.c 2026-03-07 04:18:32.000000000 +0100 @@ -133,14 +133,14 @@ STEP(5); STEP(6); STEP(7); STEP(8); } - for (k = 9; k--; L_ACF[k] <<= 1) ; + for (k = 9; k--; L_ACF[k] = SASL(L_ACF[k], 1)) ; } /* Rescaling of the array s[0..159] */ if (scalauto > 0) { assert(scalauto <= 4); - for (k = 160; k--; *s++ <<= scalauto) ; + for (k = 160; k--; *s = SASL(*s, scalauto), s++) ; } } @@ -200,7 +200,7 @@ assert(temp >= 0 && temp < 32); /* ? overflow ? */ - for (i = 0; i <= 8; i++) ACF[i] = SASR( L_ACF[i] << temp, 16 ); + for (i = 0; i <= 8; i++) ACF[i] = SASR(SASL(L_ACF[i], temp), 16); /* Initialize array P[..] and K[..] for the recursion. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/preprocess.c new/gsm-1.0-pl24/src/preprocess.c --- old/gsm-1.0-pl22/src/preprocess.c 2022-07-31 18:16:42.899313021 +0200 +++ new/gsm-1.0-pl24/src/preprocess.c 2026-03-06 16:42:09.000000000 +0100 @@ -58,7 +58,7 @@ /* 4.2.1 Downscaling of the input signal */ - SO = SASR( *s, 3 ) << 2; + SO = SASL(SASR( *s, 3 ), 2); s++; assert (SO >= -0x4000); /* downscaled by */ @@ -83,13 +83,13 @@ /* Compute the recursive part */ L_s2 = s1; - L_s2 <<= 15; + L_s2 = SASL(L_s2, 15); /* Execution of a 31 bv 16 bits multiplication */ msp = SASR( L_z2, 15 ); - lsp = L_z2-((longword)msp<<15); /* gsm_L_sub(L_z2,(msp<<15)); */ + lsp = L_z2 - SASL((longword)msp, 15); /* gsm_L_sub(L_z2,(msp<<15)); */ L_s2 += GSM_MULT_R( lsp, 32735 ); L_temp = (longword)msp * 32735; /* GSM_L_MULT(msp,32735) >> 1;*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/rpe.c new/gsm-1.0-pl24/src/rpe.c --- old/gsm-1.0-pl22/src/rpe.c 2022-07-31 18:16:42.795313021 +0200 +++ new/gsm-1.0-pl24/src/rpe.c 2026-03-06 16:37:35.000000000 +0100 @@ -330,7 +330,7 @@ assert(temp1 >= 0 && temp1 < 16); - temp = xM[i] << temp1; + temp = SASL(xM[i], temp1); temp = GSM_MULT( temp, temp2 ); temp = SASR(temp, 12); xMc[i] = temp + 4; /* see note below */ @@ -375,7 +375,7 @@ temp = (*xMc++ << 1) - 7; /* restore sign */ assert( temp <= 7 && temp >= -7 ); /* 4 bit signed */ - temp <<= 12; /* 16 bit signed */ + temp = SASL(temp, 12); /* 16 bit signed */ temp = GSM_MULT_R( temp1, temp ); temp = GSM_ADD( temp, temp3 ); *xMp++ = gsm_asr( temp, temp2 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/short_term.c new/gsm-1.0-pl24/src/short_term.c --- old/gsm-1.0-pl22/src/short_term.c 2022-07-31 18:16:42.819313021 +0200 +++ new/gsm-1.0-pl24/src/short_term.c 2026-03-06 16:39:26.000000000 +0100 @@ -52,7 +52,7 @@ #undef STEP #define STEP( B_TIMES_TWO, MIC, INVA ) \ - temp1 = GSM_ADD( *LARc++, MIC ) << 10; \ + temp1 = SASL(GSM_ADD( *LARc++, MIC ), 10); \ temp1 = GSM_SUB( temp1, B_TIMES_TWO ); \ temp1 = GSM_MULT_R( INVA, temp1 ); \ *LARpp++ = GSM_ADD( temp1, temp1 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/toast.c new/gsm-1.0-pl24/src/toast.c --- old/gsm-1.0-pl22/src/toast.c 2022-07-31 18:16:42.911313021 +0200 +++ new/gsm-1.0-pl24/src/toast.c 2026-03-07 04:50:42.000000000 +0100 @@ -211,7 +211,7 @@ } -static void catch_signals P1((fun), SIGHANDLER_T (*fun) ()) +static void catch_signals P1((fun), SIGHANDLER_T (*fun) (int)) { #ifdef SIGHUP signal( SIGHUP, fun ); @@ -230,7 +230,7 @@ #endif } -static SIGHANDLER_T onintr P0() +static SIGHANDLER_T onintr P1((signo), int signo) { char * tmp = outname; @@ -253,7 +253,7 @@ if (!(s = malloc(len))) { fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n", progname, (int)len); - onintr(); + onintr(0); exit(1); } return s; @@ -418,7 +418,7 @@ fprintf(stderr, "%s: \"%s\" has %d other link%s -- unchanged.\n", progname, name, (int)(st->st_nlink - 1), - "s" + (st->st_nlink <= 2)); + &"s"[st->st_nlink == 2]); return 0; } return 1; @@ -544,10 +544,11 @@ (void)gsm_option(r, GSM_OPT_LTP_CUT, &f_ltp_cut); while ((cc = (*input)(s)) > 0) { - if (cc < sizeof(s) / sizeof(*s)) + if (cc < sizeof(s) / sizeof(*s)) { memset((char *)(s+cc), 0, sizeof(s)-(cc * sizeof(*s))); + } gsm_encode(r, s, d); - if (fwrite((char *)d, sizeof(d), 1, out) != 1) { + if (fwrite((char *)d, 1, sizeof(d), out) != sizeof(d)) { perror(outname ? outname : "stdout"); fprintf(stderr, "%s: error writing to %s\n", progname, outname ? outname : "stdout"); @@ -588,7 +589,7 @@ if (cc >= 0) fprintf(stderr, "%s: incomplete frame (%d byte%s missing) from %s\n", progname, (int)(sizeof(s) - cc), - "s" + (sizeof(s) - cc == 1), + &"s"[sizeof(s) - cc == 1], inname ? inname : "stdin" ); gsm_destroy(r); errno = 0; @@ -643,8 +644,9 @@ goto err; } - if ((*(f_decode ? process_decode : process_encode))()) + if ((*(f_decode ? process_decode : process_encode))()) { goto err; + } if (fflush(out) < 0 || ferror(out)) { perror(outname ? outname : "stdout"); @@ -787,7 +789,6 @@ av += optind; ac -= optind; - catch_signals(onintr); if (ac <= 0) process( (char *)0 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/src/toast_lin.c new/gsm-1.0-pl24/src/toast_lin.c --- old/gsm-1.0-pl22/src/toast_lin.c 2022-07-31 18:16:42.799313021 +0200 +++ new/gsm-1.0-pl24/src/toast_lin.c 2026-03-06 16:16:07.000000000 +0100 @@ -13,7 +13,7 @@ extern FILE *in, *out; -int linear_input (buf) gsm_signal * buf; +int linear_input P1((buf), gsm_signal * buf) { return fread( (char *)buf, sizeof(*buf), 160, in ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/tst/cod2lin.c new/gsm-1.0-pl24/tst/cod2lin.c --- old/gsm-1.0-pl22/tst/cod2lin.c 2022-07-31 18:16:43.079313021 +0200 +++ new/gsm-1.0-pl24/tst/cod2lin.c 2026-03-06 16:59:50.000000000 +0100 @@ -6,7 +6,16 @@ /*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/cod2lin.c,v 1.2 1996/07/02 14:33:10 jutta Exp jutta $*/ +#ifdef HAS_STDLIB_H +# include <stdlib.h> +#else +extern void exit(int); +#endif + +#include <unistd.h> + #include <stdio.h> +#include <string.h> #include <assert.h> #include "gsm.h" @@ -20,10 +29,10 @@ int wav = 0; int error = 0; -usage P0() +int usage P0() { fprintf(stderr, "Usage: %s [-vwF] [files...]\n", pname); - exit(1); + return 1; } void process P2((f, filename), FILE * f, char * filename) @@ -71,7 +80,7 @@ } } -main P2((ac, av), int ac, char ** av) +int main P2((ac, av), int ac, char ** av) { int opt; extern char * optarg; @@ -85,7 +94,7 @@ case 'v': verbosity++; break; case 'w': wav++; break; case 'F': fast++; break; - default: usage(); + default: return usage(); } ac -= optind; @@ -100,5 +109,5 @@ } } - exit(error); + return error; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/tst/cod2txt.c new/gsm-1.0-pl24/tst/cod2txt.c --- old/gsm-1.0-pl22/tst/cod2txt.c 2022-07-31 18:16:43.087313021 +0200 +++ new/gsm-1.0-pl24/tst/cod2txt.c 2026-03-06 16:59:20.000000000 +0100 @@ -8,6 +8,7 @@ #include <stdio.h> #include <assert.h> +#include <unistd.h> #include "gsm.h" #include "proto.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/tst/gsm2cod.c new/gsm-1.0-pl24/tst/gsm2cod.c --- old/gsm-1.0-pl22/tst/gsm2cod.c 2022-07-31 18:16:43.111313021 +0200 +++ new/gsm-1.0-pl24/tst/gsm2cod.c 2026-03-06 16:59:26.000000000 +0100 @@ -8,6 +8,7 @@ #include <stdio.h> #include <assert.h> +#include <unistd.h> #include "gsm.h" #include "proto.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gsm-1.0-pl22/tst/lin2cod.c new/gsm-1.0-pl24/tst/lin2cod.c --- old/gsm-1.0-pl22/tst/lin2cod.c 2022-07-31 18:16:43.075313021 +0200 +++ new/gsm-1.0-pl24/tst/lin2cod.c 2026-03-06 16:59:34.000000000 +0100 @@ -7,6 +7,7 @@ /*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/lin2cod.c,v 1.2 1996/07/02 14:33:13 jutta Exp jutta $*/ #include <stdio.h> +#include <unistd.h> #include "gsm.h" #include "proto.h" @@ -19,10 +20,10 @@ int wav = 0; int error = 0; -usage P0() +int usage P0() { fprintf(stderr, "Usage: %s [-vwF] [files...]\n", pname); - exit(1); + return 1; } void process P2((f, filename), FILE * f, char * filename) @@ -72,7 +73,7 @@ } } -main P2((ac, av), int ac, char ** av) +int main P2((ac, av), int ac, char ** av) { int opt; extern char * optarg; @@ -86,7 +87,7 @@ case 'v': verbosity++; break; case 'w': wav++; break; case 'F': fast++; break; - default: usage(); + default: return usage(); } ac -= optind; @@ -100,6 +101,5 @@ fclose(f); } } - - exit(error); + return error; }
