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
c4a43f8a
Commit
c4a43f8a
authored
Oct 14, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss: use unsigned integer for ioctl constants
The OSS constants overflow a signed integer, use unsigned instead.
parent
f01a08d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
audioOutput_oss.c
src/audioOutputs/audioOutput_oss.c
+12
-12
No files found.
src/audioOutputs/audioOutput_oss.c
View file @
c4a43f8a
...
@@ -66,7 +66,7 @@ enum oss_param {
...
@@ -66,7 +66,7 @@ enum oss_param {
};
};
static
enum
oss_param
static
enum
oss_param
getIndexForParam
(
int
param
)
getIndexForParam
(
unsigned
param
)
{
{
enum
oss_param
idx
=
OSS_RATE
;
enum
oss_param
idx
=
OSS_RATE
;
...
@@ -85,7 +85,7 @@ getIndexForParam(int param)
...
@@ -85,7 +85,7 @@ getIndexForParam(int param)
return
idx
;
return
idx
;
}
}
static
int
findSupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
int
findSupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
int
i
;
int
i
;
enum
oss_param
idx
=
getIndexForParam
(
param
);
enum
oss_param
idx
=
getIndexForParam
(
param
);
...
@@ -114,7 +114,7 @@ static int canConvert(int idx, int val)
...
@@ -114,7 +114,7 @@ static int canConvert(int idx, int val)
return
1
;
return
1
;
}
}
static
int
getSupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
int
getSupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
int
i
;
int
i
;
enum
oss_param
idx
=
getIndexForParam
(
param
);
enum
oss_param
idx
=
getIndexForParam
(
param
);
...
@@ -138,7 +138,7 @@ static int getSupportedParam(OssData * od, int param, int val)
...
@@ -138,7 +138,7 @@ static int getSupportedParam(OssData * od, int param, int val)
return
ret
;
return
ret
;
}
}
static
int
findUnsupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
int
findUnsupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
int
i
;
int
i
;
enum
oss_param
idx
=
getIndexForParam
(
param
);
enum
oss_param
idx
=
getIndexForParam
(
param
);
...
@@ -151,7 +151,7 @@ static int findUnsupportedParam(OssData * od, int param, int val)
...
@@ -151,7 +151,7 @@ static int findUnsupportedParam(OssData * od, int param, int val)
return
0
;
return
0
;
}
}
static
void
addSupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
addSupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
enum
oss_param
idx
=
getIndexForParam
(
param
);
enum
oss_param
idx
=
getIndexForParam
(
param
);
...
@@ -161,7 +161,7 @@ static void addSupportedParam(OssData * od, int param, int val)
...
@@ -161,7 +161,7 @@ static void addSupportedParam(OssData * od, int param, int val)
od
->
supported
[
idx
][
od
->
numSupported
[
idx
]
-
1
]
=
val
;
od
->
supported
[
idx
][
od
->
numSupported
[
idx
]
-
1
]
=
val
;
}
}
static
void
addUnsupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
addUnsupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
enum
oss_param
idx
=
getIndexForParam
(
param
);
enum
oss_param
idx
=
getIndexForParam
(
param
);
...
@@ -172,7 +172,7 @@ static void addUnsupportedParam(OssData * od, int param, int val)
...
@@ -172,7 +172,7 @@ static void addUnsupportedParam(OssData * od, int param, int val)
od
->
unsupported
[
idx
][
od
->
numUnsupported
[
idx
]
-
1
]
=
val
;
od
->
unsupported
[
idx
][
od
->
numUnsupported
[
idx
]
-
1
]
=
val
;
}
}
static
void
removeSupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
removeSupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
int
i
;
int
i
;
int
j
=
0
;
int
j
=
0
;
...
@@ -189,7 +189,7 @@ static void removeSupportedParam(OssData * od, int param, int val)
...
@@ -189,7 +189,7 @@ static void removeSupportedParam(OssData * od, int param, int val)
od
->
numSupported
[
idx
]
*
sizeof
(
int
));
od
->
numSupported
[
idx
]
*
sizeof
(
int
));
}
}
static
void
removeUnsupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
removeUnsupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
int
i
;
int
i
;
int
j
=
0
;
int
j
=
0
;
...
@@ -208,7 +208,7 @@ static void removeUnsupportedParam(OssData * od, int param, int val)
...
@@ -208,7 +208,7 @@ static void removeUnsupportedParam(OssData * od, int param, int val)
}
}
static
enum
oss_support
static
enum
oss_support
isSupportedParam
(
OssData
*
od
,
int
param
,
int
val
)
isSupportedParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
if
(
findSupportedParam
(
od
,
param
,
val
))
if
(
findSupportedParam
(
od
,
param
,
val
))
return
OSS_SUPPORTED
;
return
OSS_SUPPORTED
;
...
@@ -217,7 +217,7 @@ isSupportedParam(OssData * od, int param, int val)
...
@@ -217,7 +217,7 @@ isSupportedParam(OssData * od, int param, int val)
return
OSS_UNKNOWN
;
return
OSS_UNKNOWN
;
}
}
static
void
supportParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
supportParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
enum
oss_support
supported
=
isSupportedParam
(
od
,
param
,
val
);
enum
oss_support
supported
=
isSupportedParam
(
od
,
param
,
val
);
...
@@ -231,7 +231,7 @@ static void supportParam(OssData * od, int param, int val)
...
@@ -231,7 +231,7 @@ static void supportParam(OssData * od, int param, int val)
addSupportedParam
(
od
,
param
,
val
);
addSupportedParam
(
od
,
param
,
val
);
}
}
static
void
unsupportParam
(
OssData
*
od
,
int
param
,
int
val
)
static
void
unsupportParam
(
OssData
*
od
,
unsigned
param
,
int
val
)
{
{
enum
oss_support
supported
=
isSupportedParam
(
od
,
param
,
val
);
enum
oss_support
supported
=
isSupportedParam
(
od
,
param
,
val
);
...
@@ -404,7 +404,7 @@ static void oss_finishDriver(void *data)
...
@@ -404,7 +404,7 @@ static void oss_finishDriver(void *data)
freeOssData
(
od
);
freeOssData
(
od
);
}
}
static
int
setParam
(
OssData
*
od
,
int
param
,
int
*
value
)
static
int
setParam
(
OssData
*
od
,
unsigned
param
,
int
*
value
)
{
{
int
val
=
*
value
;
int
val
=
*
value
;
int
copy
;
int
copy
;
...
...
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