mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pipewire: fix scan-build errors for unused variables
All cases of value stored but never read
This commit is contained in:
parent
049eaac821
commit
0b5f19f1d2
4 changed files with 9 additions and 12 deletions
|
|
@ -117,7 +117,7 @@ static int get_read_path(char *path, size_t size, const char *prefix, const char
|
|||
|
||||
static int ensure_path(char *path, int size, const char *paths[])
|
||||
{
|
||||
int i, len, res, mode;
|
||||
int i, len, mode;
|
||||
char *p = path;
|
||||
|
||||
for (i = 0; paths[i] != NULL; i++) {
|
||||
|
|
@ -134,14 +134,14 @@ static int ensure_path(char *path, int size, const char *paths[])
|
|||
if (paths[i+1] == NULL)
|
||||
mode |= R_OK | W_OK;
|
||||
|
||||
if ((res = access(path, mode)) < 0) {
|
||||
if (access(path, mode) < 0) {
|
||||
if (errno != ENOENT)
|
||||
return -errno;
|
||||
if ((res = mkdir(path, 0700)) < 0) {
|
||||
if (mkdir(path, 0700) < 0) {
|
||||
pw_log_info("Can't create directory %s: %m", path);
|
||||
return -errno;
|
||||
}
|
||||
if ((res = access(path, mode)) < 0)
|
||||
if (access(path, mode) < 0)
|
||||
return -errno;
|
||||
|
||||
pw_log_info("created directory %s", path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue