mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-04-03 07:15:37 -04:00
retain const qualifier from pointer
Since glibc-2.43: For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the in put argument is a pointer to a const-qualified type. https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html fixes the follow warnings: - warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
This commit is contained in:
parent
b096704c0d
commit
382c9b58f6
9 changed files with 22 additions and 17 deletions
|
|
@ -2732,7 +2732,8 @@ enum {
|
|||
int main(int argc, char *argv[]) {
|
||||
pa_mainloop *m = NULL;
|
||||
int ret = 1, c;
|
||||
char *server = NULL, *opt_format = NULL, *bn;
|
||||
const char *bn;
|
||||
char *server = NULL, *opt_format = NULL;
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"server", 1, NULL, 's'},
|
||||
|
|
@ -2848,7 +2849,7 @@ int main(int argc, char *argv[]) {
|
|||
if (optind+2 < argc)
|
||||
sample_name = pa_xstrdup(argv[optind+2]);
|
||||
else {
|
||||
char *f = pa_path_get_filename(argv[optind+1]);
|
||||
const char *f = pa_path_get_filename(argv[optind+1]);
|
||||
sample_name = pa_xstrndup(f, strcspn(f, "."));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue