Bug#1066115: mpg123: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]

2024-03-26 Thread Andreas Metzler
On 2024-03-26 Joachim Reichel  wrote:
> Hi Andreas,

> usually I would have implemented your suggestion (and I don't mind anyone
> implementing it), but I'm not really keen on investing in a dependency that
> hasn't seen a single upstream release in 12 years and where the last upload
> was an NMU four years ago from myself dealing with a similar problem. I hope
> that explains why I took the route of this suboptimal shortcut.

OK, I will probably do a superceding NMU then. (And try to get this
removed from sid in the longer term.)

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



Bug#1066115: mpg123: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]

2024-03-26 Thread Joachim Reichel

Hi Andreas,

usually I would have implemented your suggestion (and I don't mind anyone 
implementing it), but I'm not really keen on investing in a dependency that 
hasn't seen a single upstream release in 12 years and where the last upload was 
an NMU four years ago from myself dealing with a similar problem. I hope that 
explains why I took the route of this suboptimal shortcut.


Best regards,
  Joachim



Bug#1066115: mpg123: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]

2024-03-26 Thread Andreas Metzler
On 2024-03-22 Joachim Reichel  wrote:
> tag 1066115 + patch
> thanks

> Hi,

> attached is the debdiff for the NMU, uploaded to delayed/10. Similar to the
> previous NMU it adds -Wno-error=implicit-function-declaration to downgrade
> these errors back into warnings again.
[...]

That seems to be suboptimal. How about adding the missing declarations
instead?

cu Andreas

--- mpg321-0.3.2.orig/mpg321.h
+++ mpg321-0.3.2/mpg321.h
@@ -242,7 +242,7 @@ typedef struct {
 } fft_state;
 
 typedef short int sound_sample;
-//void fft_perform(const sound_sample *input, double *output, fft_state *state);
+void fft_perform(const sound_sample *input, double *output, fft_state *state);
 
 fft_state *fft_init(void);
 
@@ -290,6 +290,14 @@ output_frame *Output_Queue;
 /* Shared total decoded frames */
 decoded_frames *Decoded_Frames;
 
+int init_alsa_volume_control(char *name);
+int calc_http_length(buffer *buf);
+long mpg321_alsa_get_volume();
+void mpg321_alsa_set_volume(long value);
+void do_basicauth();
+ao_device *open_ao_playdevice_buffer(struct mad_header const *header);
+int check_default_play_device_buffer();
+
 #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
 /* */
 #else


Bug#1066115: mpg123: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]

2024-03-22 Thread Joachim Reichel

tag 1066115 + patch
thanks

Hi,

attached is the debdiff for the NMU, uploaded to delayed/10. Similar to the 
previous NMU it adds -Wno-error=implicit-function-declaration to downgrade these 
errors back into warnings again.


Best regards,
  Joachimdiff -Nru mpg321-0.3.2/debian/changelog mpg321-0.3.2/debian/changelog
--- mpg321-0.3.2/debian/changelog   2020-07-23 17:22:42.0 +0200
+++ mpg321-0.3.2/debian/changelog   2024-03-21 21:39:07.0 +0100
@@ -1,3 +1,11 @@
+mpg321 (0.3.2-3.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add -Wno-error=implicit-function-declaration to CFLAGS to disable
+new defaults from dpkg-buildflags (Closes: #1066115).
+
+ -- Joachim Reichel   Thu, 21 Mar 2024 20:39:07 +
+
 mpg321 (0.3.2-3.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru mpg321-0.3.2/debian/rules mpg321-0.3.2/debian/rules
--- mpg321-0.3.2/debian/rules   2020-07-23 17:22:42.0 +0200
+++ mpg321-0.3.2/debian/rules   2024-03-21 21:37:50.0 +0100
@@ -4,7 +4,7 @@
 #export DH_VERBOSE=1
 
 
-export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wunused 
-Wno-error=format-security -Wno-error=implicit-function-declaration -fcommon 
+export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wunused 
-Wno-error=format-security -Wno-error=implicit-function-declaration -fcommon
 
 MPG321_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 


Bug#1066115: mpg123: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]

2024-03-12 Thread Sebastian Ramacher
Source: mpg321
Version: 0.3.2-3.1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramac...@debian.org

https://buildd.debian.org/status/fetch.php?pkg=mpg321=armel=0.3.2-3.1%2Bb1=1710256758=0

gcc -DHAVE_CONFIG_H -I. -g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/<>=. -fstack-protector-strong 
-fstack-clash-protection -Wformat -Werror=format-security -Wall -Wunused 
-Wno-error=format-security -fcommon  -I/usr/include -DHAVE_ALSA -MT mpg321.o 
-MD -MP -MF .deps/mpg321.Tpo -c -o mpg321.o mpg321.c
mpg321.c:102:8: warning: type defaults to ‘int’ in declaration of 
‘http_file_length’ [-Wimplicit-int]
  102 | extern http_file_length;
  |^~~~
mpg321.c: In function ‘read_keyb’:
mpg321.c:132:27: error: implicit declaration of function 
‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]
  132 | bvolume = mpg321_alsa_get_volume();
  |   ^~
mpg321.c:173:33: error: implicit declaration of function 
‘mpg321_alsa_set_volume’ [-Werror=implicit-function-declaration]
  173 | mpg321_alsa_set_volume(bvolume);
  | ^~
mpg321.c:186:75: warning: format ‘%ld’ expects argument of type ‘long int’, but 
argument 3 has type ‘int’ [-Wformat=]
  186 | fprintf(stderr,"Volume: 
%ld%%  \r",volume);
  | 
~~^~~
  | 
  ||
  | 
  long int int
  | 
%d
mpg321.c:236:75: warning: format ‘%ld’ expects argument of type ‘long int’, but 
argument 3 has type ‘int’ [-Wformat=]
  236 | fprintf(stderr,"Volume: 
%ld%%  \r",volume);
  | 
~~^~~
  | 
  ||
  | 
  long int int
  | 
%d
mpg321.c: In function ‘show_id3’:
mpg321.c:450:24: warning: format not a string literal and no format arguments 
[-Wformat-security]
  450 | printf(emptystring);
  |^~~
mpg321.c:468:34: warning: format not a string literal and no format arguments 
[-Wformat-security]
  468 | fprintf (stderr, emptystring);
  |  ^~~
mpg321.c: In function ‘main’:
mpg321.c:688:17: error: implicit declaration of function 
‘init_alsa_volume_control’ [-Werror=implicit-function-declaration]
  688 | init_alsa_volume_control("default"); /* For the moment 
use "default", it works on most of the systems. Tested in 
Debian,Fedora,Ubuntu,RedHat,CentOS,Gentoo */
  | ^~~~
mpg321.c:882:13: error: implicit declaration of function ‘calc_http_length’; 
did you mean ‘calc_length’? [-Werror=implicit-function-declaration]
  882 | calc_http_length();
  | ^~~~
  | calc_length
mpg321.c: In function ‘id3_get_tag’:
mpg321.c:1237:31: warning: pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness [-Wpointer-sign]
 1237 | if (!latin1 || strlen(latin1) == 0) return (NULL);
  |   ^~
  |   |
  |   id3_latin1_t * {aka unsigned char *}
In file included from mpg321.c:35:
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of 
type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
  407 | extern size_t strlen (const char *__s)
  |   ^~~
mpg321.c:1238:22: warning: pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness [-Wpointer-sign]
 1238 | len = strlen(latin1);
  |  ^~
  |  |
  |  id3_latin1_t * {aka unsigned char *}
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of 
type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
  407 | extern size_t strlen (const char *__s)
  |   ^~~
mpg321.c:1245:29: warning: pointer targets in passing argument 2 of ‘strncat’ 
differ in signedness [-Wpointer-sign]
 1245 | strncat (printable, latin1, tocopy);
  | ^~
  | |
  |