From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 67C80158041 for ; Wed, 20 Mar 2024 06:26:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37587E29BD; Wed, 20 Mar 2024 06:26:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 068F4E29B7 for ; Wed, 20 Mar 2024 06:26:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0C08E340775 for ; Wed, 20 Mar 2024 06:26:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4842E1593 for ; Wed, 20 Mar 2024 06:26:45 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1710915421.2034f4dc27f765d1d8ab8eddaf4142a3286dfa29.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch media-libs/nas/nas-1.9.5-r1.ebuild X-VCS-Directories: media-libs/nas/files/ media-libs/nas/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2034f4dc27f765d1d8ab8eddaf4142a3286dfa29 X-VCS-Branch: master Date: Wed, 20 Mar 2024 06:26:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d801aa5d-f4e5-418f-81b3-b4655f0d2cae X-Archives-Hash: 729f65b808858fa6364234dbb1392c99 commit: 2034f4dc27f765d1d8ab8eddaf4142a3286dfa29 Author: Eli Schwartz gmail com> AuthorDate: Wed Mar 20 03:13:48 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Mar 20 06:17:01 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2034f4dc media-libs/nas: backport upstreamed patches to fix Modern C bugs Closes: https://bugs.gentoo.org/873619 Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Sam James gentoo.org> ...as-1.9.5-Correct-pointer-types-for-GCC-14.patch | 108 +++ ...o-implicit-ints-and-function-declarations.patch | 834 +++++++++++++++++++++ media-libs/nas/nas-1.9.5-r1.ebuild | 121 +++ 3 files changed, 1063 insertions(+) diff --git a/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch b/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch new file mode 100644 index 000000000000..1ed7dae2d48c --- /dev/null +++ b/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch @@ -0,0 +1,108 @@ +From cffa7bbc124f775520914a0cfb0ede619a05e07d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 2 Feb 2024 16:05:11 +0100 +Subject: [PATCH] Correct pointer types for GCC 14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 14 became pickier about pointer types: + +auth.c:71:26: error: initialization of ‘int (*)()’ from incompatible pointer type ‘int (*)(short unsigned int, char *)’ [-Wincompatible-pointer-types] + 71 | MitToID, MitFromID, MitRemoveCookie, + | ^~~~~~~~~~~~~~~ + +Including const correctness: + +audemo.c: In function ‘rescanCB’: +audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types] + 524 | makeFileList(globals->fileNames, globals->numFiles), + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | char ** + +This patch fixes these errors. + +Signed-off-by: Petr Písař +--- + clients/audio/audemo/audemo.c | 28 ++++++++++++++-------------- + server/os/auth.c | 2 +- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/clients/audio/audemo/audemo.c b/clients/audio/audemo/audemo.c +index 5617cf7..e77b95d 100644 +--- a/clients/audio/audemo/audemo.c ++++ b/clients/audio/audemo/audemo.c +@@ -500,11 +500,11 @@ newBucketCB(Widget w, XtPointer globalsp, XtPointer call_data) + static void + rescanCB(Widget w, XtPointer globalsp, XtPointer call_data) + { +- GlobalDataPtr globals = (GlobalDataPtr) globalsp; +- static char *noFilesString = "No files found"; +- char *dir, +- *template; +- int i; ++ GlobalDataPtr globals = (GlobalDataPtr) globalsp; ++ static const char *noFilesString = "No files found"; ++ char *dir, ++ *template; ++ int i; + + if (globals->numFiles) + { +@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data) + if (globals->numFiles) + { + XawListChange(globals->samples, +- makeFileList(globals->fileNames, globals->numFiles), ++ (const char **)makeFileList(globals->fileNames, globals->numFiles), + globals->numFiles, -1, True); + XtSetSensitive(globals->samples, True); + } +@@ -591,13 +591,13 @@ bucketPlayCB(Widget w, XtPointer globalsp, XtPointer call_data) + static void + bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data) + { +- GlobalDataPtr globals = (GlobalDataPtr) globalsp; ++ GlobalDataPtr globals = (GlobalDataPtr) globalsp; + BucketDialogDataPtr buf = &globals->buf; +- char tmp[200], +- access[4], +- desc[COMMENT_LEN]; +- int i; +- static char *noBucketString = "No buckets"; ++ char tmp[200], ++ access[4], ++ desc[COMMENT_LEN]; ++ int i; ++ static const char *noBucketString = "No buckets"; + + if (buf->numBuckets) + { +@@ -652,8 +652,8 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data) + + if (buf->numBuckets) + { +- XawListChange(buf->bucketList, buf->bucketText, buf->numBuckets, -1, +- True); ++ XawListChange(buf->bucketList, (const char **)buf->bucketText, ++ buf->numBuckets, -1, True); + XtSetSensitive(buf->bucketList, True); + } + else +diff --git a/server/os/auth.c b/server/os/auth.c +index a80a257..9488db7 100644 +--- a/server/os/auth.c ++++ b/server/os/auth.c +@@ -55,7 +55,7 @@ struct protocol { + int (*Reset) (); /* delete all authorization data entries */ + AuID(*ToID) (); /* convert cookie to ID */ + int (*FromID) (); /* convert ID to cookie */ +- int (*Remove) (); /* remove a specific cookie */ ++ int (*Remove) (unsigned short, char *); /* remove a specific cookie */ + }; + + extern int MitAddCookie(); +-- +2.43.0 + diff --git a/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch b/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch new file mode 100644 index 000000000000..a3a7e50efdec --- /dev/null +++ b/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch @@ -0,0 +1,834 @@ +From 0e08ed6753a547637a39ede05a006d9b730647df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 22 Nov 2022 13:11:26 +0100 +Subject: [PATCH] No implicit ints and function declarations +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 13 or 14 is going to remove some old and by C99 standard obsolete +features, like implicit int types and implicit function declararations, +from an implicit gnu18 compilator standard. The compiler will report +an error instead: + +conftest.c:62:1: error: type defaults to 'int' in declaration of 'main' + 62 | main() + | ^~~~ +conftest.c:65:3: error: implicit declaration of function 'exit' + 65 | exit(0); + | ^~~~ + +This patch adjusts the code to remain compilable. For some functions, +it fixes their return type from int to void. Few functions which +apparantly are internal to a compilatation unit were made static. +_AuSendClientPrefix() was declared in a public header. + +Tested with an instrumented GCC 13.0.1. + + + +Signed-off-by: Petr Písař +--- + clients/audio/auctl/execute.c | 1 + + clients/audio/auplay/auplay.c | 1 + + clients/audio/examples/playFile.c | 1 + + config/configure.ac | 5 +- + config/filelist | 3 ++ + lib/audio/Alibint.h | 8 ++++ + lib/audio/ConnSvr.c | 3 ++ + server/dda/voxware/auvoxware.c | 3 +- + server/dda/voxware/config.c | 2 + + server/dia/au.h | 2 + + server/dia/gram.y | 1 + + server/include/access.h | 36 ++++++++++++++ + server/include/auth.h | 27 +++++++++++ + server/include/dix.h | 6 ++- + server/include/io.h | 29 ++++++++++++ + server/include/os.h | 2 + + server/os/access.c | 79 +++++++++++++++++-------------- + server/os/auth.c | 11 ++++- + server/os/connection.c | 23 +++++++-- + server/os/daemon.c | 4 ++ + server/os/io.c | 3 +- + server/os/mitauth.c | 2 + + server/os/osdep.h | 5 ++ + 23 files changed, 211 insertions(+), 46 deletions(-) + create mode 100644 server/include/access.h + create mode 100644 server/include/auth.h + create mode 100644 server/include/io.h + +diff --git a/clients/audio/auctl/execute.c b/clients/audio/auctl/execute.c +index 12f7c05..fd7a937 100644 +--- a/clients/audio/auctl/execute.c ++++ b/clients/audio/auctl/execute.c +@@ -22,6 +22,7 @@ + * $NCDId: @(#)execute.c,v 1.7 1994/04/07 18:10:33 greg Exp $ + */ + ++#include + #include "auctl.h" + + static int _execute_set PROTO((AuServer *, int, char **)); +diff --git a/clients/audio/auplay/auplay.c b/clients/audio/auplay/auplay.c +index 4037a64..c9d880e 100644 +--- a/clients/audio/auplay/auplay.c ++++ b/clients/audio/auplay/auplay.c +@@ -146,6 +146,7 @@ do_file(char *fname) + fprintf(stderr, "Couldn't play file \"%s\"\n", fname); + } + ++int + main(int argc, char **argv) + { + int i, +diff --git a/clients/audio/examples/playFile.c b/clients/audio/examples/playFile.c +index 646077e..e8828a8 100644 +--- a/clients/audio/examples/playFile.c ++++ b/clients/audio/examples/playFile.c +@@ -13,6 +13,7 @@ + #include