Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a38f0254
Commit
a38f0254
authored
Jan 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config/Param: make "line" signed
parent
fdba76ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
LogInit.cxx
src/LogInit.cxx
+4
-4
Param.hxx
src/config/Param.hxx
+2
-2
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+1
-1
No files found.
src/LogInit.cxx
View file @
a38f0254
...
...
@@ -72,14 +72,14 @@ open_log_file(void)
}
static
bool
log_init_file
(
unsigned
line
,
Error
&
error
)
log_init_file
(
int
line
,
Error
&
error
)
{
assert
(
!
out_path
.
IsNull
());
out_fd
=
open_log_file
();
if
(
out_fd
<
0
)
{
const
std
::
string
out_path_utf8
=
out_path
.
ToUTF8
();
error
.
FormatErrno
(
"failed to open log file
\"
%s
\"
(config line %
u
)"
,
error
.
FormatErrno
(
"failed to open log file
\"
%s
\"
(config line %
d
)"
,
out_path_utf8
.
c_str
(),
line
);
return
false
;
}
...
...
@@ -89,7 +89,7 @@ log_init_file(unsigned line, Error &error)
}
static
inline
LogLevel
parse_log_level
(
const
char
*
value
,
unsigned
line
)
parse_log_level
(
const
char
*
value
,
int
line
)
{
if
(
0
==
strcmp
(
value
,
"default"
))
return
LogLevel
::
DEFAULT
;
...
...
@@ -98,7 +98,7 @@ parse_log_level(const char *value, unsigned line)
else
if
(
0
==
strcmp
(
value
,
"verbose"
))
return
LogLevel
::
DEBUG
;
else
{
FormatFatalError
(
"unknown log level
\"
%s
\"
at line %
u
"
,
FormatFatalError
(
"unknown log level
\"
%s
\"
at line %
d
"
,
value
,
line
);
}
}
...
...
src/config/Param.hxx
View file @
a38f0254
...
...
@@ -38,7 +38,7 @@ struct config_param {
std
::
string
value
;
unsigned
int
line
;
int
line
;
std
::
vector
<
BlockParam
>
block_params
;
...
...
@@ -66,7 +66,7 @@ struct config_param {
* configuration file.
*/
bool
IsNull
()
const
{
return
line
==
unsigned
(
-
1
)
;
return
line
<
0
;
}
gcc_nonnull_all
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
a38f0254
...
...
@@ -97,7 +97,7 @@ require_block_string(const config_param ¶m, const char *name)
const
char
*
value
=
param
.
GetBlockValue
(
name
);
if
(
value
==
nullptr
)
FormatFatalError
(
"no
\"
%s
\"
defined for shout device defined "
"at line %
u
\n
"
,
name
,
param
.
line
);
"at line %
d
\n
"
,
name
,
param
.
line
);
return
value
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment