0006-seq-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. From 66112d60e4ce68720022eaf26080c0f1a2caf81f Mon Sep 17 00:00:00 2001
  2. From: Jaroslav Kysela <perex@perex.cz>
  3. Date: Mon, 4 Sep 2023 16:52:46 +0200
  4. Subject: [PATCH] seq: use ATTRIBUTE_UNUSED instead remove argument name
  5. We need to support older compilers than GCC 11.
  6. Link: https://github.com/alsa-project/alsa-utils/issues/233
  7. Fixes: 181e190 ("aplaymidi: fix the verbose compilation warnings for latest gcc")
  8. Fixes: a03377a ("aseqnet: fix the verbose compilation warnings for latest gcc")
  9. Fixes: 429c32a ("aseqdump: fix the verbose compilation warnings for latest gcc")
  10. Fixes: 0b48dd6 ("aconnect: fix the verbose compilation warnings for latest gcc")
  11. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  12. Upstream: https://github.com/alsa-project/alsa-utils/commit/66112d60e4ce68720022eaf26080c0f1a2caf81f
  13. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  14. ---
  15. seq/aconnect/aconnect.c | 9 ++++++---
  16. seq/aplaymidi/arecordmidi.c | 2 +-
  17. seq/aseqdump/aseqdump.c | 2 +-
  18. seq/aseqnet/aseqnet.c | 2 +-
  19. 4 files changed, 9 insertions(+), 6 deletions(-)
  20. diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c
  21. index 3a10de9..7096feb 100644
  22. --- a/seq/aconnect/aconnect.c
  23. +++ b/seq/aconnect/aconnect.c
  24. @@ -193,7 +193,8 @@ static void do_search_port(snd_seq_t *seq, int perm, action_func_t do_action)
  25. }
  26. -static void print_port(snd_seq_t *, snd_seq_client_info_t *cinfo,
  27. +static void print_port(snd_seq_t *seq ATTRIBUTE_UNUSED,
  28. + snd_seq_client_info_t *cinfo,
  29. snd_seq_port_info_t *pinfo, int count)
  30. {
  31. if (! count) {
  32. @@ -247,8 +248,10 @@ static void print_port_and_subs(snd_seq_t *seq, snd_seq_client_info_t *cinfo,
  33. /*
  34. * remove all (exported) connections
  35. */
  36. -static void remove_connection(snd_seq_t *seq, snd_seq_client_info_t *,
  37. - snd_seq_port_info_t *pinfo, int)
  38. +static void remove_connection(snd_seq_t *seq,
  39. + snd_seq_client_info_t *info ATTRIBUTE_UNUSED,
  40. + snd_seq_port_info_t *pinfo,
  41. + int count ATTRIBUTE_UNUSED)
  42. {
  43. snd_seq_query_subscribe_t *query;
  44. snd_seq_port_info_t *port;
  45. diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
  46. index ce71472..a4c1181 100644
  47. --- a/seq/aplaymidi/arecordmidi.c
  48. +++ b/seq/aplaymidi/arecordmidi.c
  49. @@ -719,7 +719,7 @@ static void version(void)
  50. fputs("arecordmidi version " SND_UTIL_VERSION_STR "\n", stderr);
  51. }
  52. -static void sighandler(int)
  53. +static void sighandler(int sig ATTRIBUTE_UNUSED)
  54. {
  55. stop = 1;
  56. }
  57. diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
  58. index 8455ecb..af4ca21 100644
  59. --- a/seq/aseqdump/aseqdump.c
  60. +++ b/seq/aseqdump/aseqdump.c
  61. @@ -676,7 +676,7 @@ static void version(void)
  62. puts("aseqdump version " SND_UTIL_VERSION_STR);
  63. }
  64. -static void sighandler(int)
  65. +static void sighandler(int sig ATTRIBUTE_UNUSED)
  66. {
  67. stop = 1;
  68. }
  69. diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c
  70. index f40de7d..aa70b50 100644
  71. --- a/seq/aseqnet/aseqnet.c
  72. +++ b/seq/aseqnet/aseqnet.c
  73. @@ -334,7 +334,7 @@ static void get_net_addr(struct addrinfo *rp, char *buf, size_t buflen)
  74. /*
  75. * signal handler
  76. */
  77. -static void sigterm_exit(int)
  78. +static void sigterm_exit(int sig ATTRIBUTE_UNUSED)
  79. {
  80. close_files();
  81. exit(1);
  82. --
  83. 2.39.2