diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-06-29 23:37:30 +0530 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-06-30 13:01:13 +0200 |
commit | af5d77ccbceaf50f65a7da061f83ae0d8c0aa061 (patch) | |
tree | b11d6f5480ac4843ede74cb23383400b96a4bc5c /media-libs/nas/files | |
parent | dev-qt/qtlocation: Stabilize 5.15.14-r1 arm, #935163 (diff) | |
download | gentoo-af5d77ccbceaf50f65a7da061f83ae0d8c0aa061.tar.gz gentoo-af5d77ccbceaf50f65a7da061f83ae0d8c0aa061.tar.bz2 gentoo-af5d77ccbceaf50f65a7da061f83ae0d8c0aa061.zip |
media-libs/nas: Fix passing of incompatible pointer type
Closes: https://bugs.gentoo.org/927451
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36484
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-libs/nas/files')
-rw-r--r-- | media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch new file mode 100644 index 000000000000..629bd5dff2f0 --- /dev/null +++ b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch @@ -0,0 +1,76 @@ +https://sourceforge.net/p/nas/bugs/15/ +From: Brahmajit Das <brahmajit.xyz@gmail.com> +Date: Tue, 30 Apr 2024 01:06:32 +0530 +Subject: [PATCH 1/1] Partially revert commit e792e42 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit e792e42 introduced some regression with GCC 14 and 15 espcially +to the chaged sections of the code in audemo.c. Thus resutling in errors +such as: + +audemo.c: In function ‘rescanCB’: +audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types] + 524 | (const char **)makeFileList(globals->fileNames, globals->numFiles), + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | const char ** +In file included from audemo.c:97: +/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’ + 170 | String *list, + | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ +audemo.c:530:41: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types] + 530 | XawListChange(globals->samples, &noFilesString, 1, -1, True); + | ^~~~~~~~~~~~~~ + | | + | const char ** +/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’ + 170 | String *list, + | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ + +First observed on Gentoo Linux with GCC 14, I reproduced with GCC 15 as +well. Please reffer: https://bugs.gentoo.org/927451 + +Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> +--- a/clients/audio/audemo/audemo.c ++++ b/clients/audio/audemo/audemo.c +@@ -501,7 +501,7 @@ static void + rescanCB(Widget w, XtPointer globalsp, XtPointer call_data) + { + GlobalDataPtr globals = (GlobalDataPtr) globalsp; +- static const char *noFilesString = "No files found"; ++ static char *noFilesString = "No files found"; + char *dir, + *template; + int i; +@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data) + if (globals->numFiles) + { + XawListChange(globals->samples, +- (const char **)makeFileList(globals->fileNames, globals->numFiles), ++ makeFileList(globals->fileNames, globals->numFiles), + globals->numFiles, -1, True); + XtSetSensitive(globals->samples, True); + } +@@ -597,7 +597,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data) + access[4], + desc[COMMENT_LEN]; + int i; +- static const char *noBucketString = "No buckets"; ++ static char *noBucketString = "No buckets"; + + if (buf->numBuckets) + { +@@ -652,7 +652,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data) + + if (buf->numBuckets) + { +- XawListChange(buf->bucketList, (const char **)buf->bucketText, ++ XawListChange(buf->bucketList, buf->bucketText, + buf->numBuckets, -1, True); + XtSetSensitive(buf->bucketList, True); + } +-- +2.45.0.rc1.218.g7b19149425.dirty + |