mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-26 07:58:03 -04:00
treewide: fix some -Wdiscarded-qualifiers
Newer glibc versions have made certain `str*()` functions into macros
that ensure that the const-ness of the argument is propagated to the
return type.
(cherry picked from commit e46bfe67b6)
This commit is contained in:
parent
4c2692342e
commit
c3d7373cf9
3 changed files with 5 additions and 8 deletions
|
|
@ -73,7 +73,7 @@ impl_log_logtv(void *object,
|
|||
char timestamp[18] = {0};
|
||||
char topicstr[32] = {0};
|
||||
char filename[64] = {0};
|
||||
char location[1000 + RESERVED_LENGTH], *p, *s;
|
||||
char location[1000 + RESERVED_LENGTH], *p;
|
||||
static const char * const levels[] = { "-", "E", "W", "I", "D", "T", "*T*" };
|
||||
const char *prefix = "", *suffix = "";
|
||||
int size, len;
|
||||
|
|
@ -118,7 +118,7 @@ impl_log_logtv(void *object,
|
|||
|
||||
|
||||
if (impl->line && line != 0) {
|
||||
s = strrchr(file, '/');
|
||||
const char *s = strrchr(file, '/');
|
||||
spa_scnprintf(filename, sizeof(filename), "[%16.16s:%5i %s()]",
|
||||
s ? s + 1 : file, line, func);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue