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
6139174d
Commit
6139174d
authored
Jan 15, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm_convert: removed unused variable "dest_size"
dest_size is only used in an assertion. Remove its declaration and move the formula into the assertion.
parent
8fe867c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
pcm_convert.c
src/pcm_convert.c
+2
-4
No files found.
src/pcm_convert.c
View file @
6139174d
...
@@ -57,7 +57,6 @@ pcm_convert_16(const struct audio_format *src_format,
...
@@ -57,7 +57,6 @@ pcm_convert_16(const struct audio_format *src_format,
{
{
const
int16_t
*
buf
;
const
int16_t
*
buf
;
size_t
len
;
size_t
len
;
size_t
dest_size
=
pcm_convert_size
(
src_format
,
src_size
,
dest_format
);
assert
(
dest_format
->
bits
==
16
);
assert
(
dest_format
->
bits
==
16
);
...
@@ -83,7 +82,7 @@ pcm_convert_16(const struct audio_format *src_format,
...
@@ -83,7 +82,7 @@ pcm_convert_16(const struct audio_format *src_format,
dest_format
->
sample_rate
,
dest_format
->
sample_rate
,
&
len
);
&
len
);
assert
(
dest_size
>=
len
);
assert
(
pcm_convert_size
(
src_format
,
src_size
,
dest_format
)
>=
len
);
memcpy
(
dest_buffer
,
buf
,
len
);
memcpy
(
dest_buffer
,
buf
,
len
);
return
len
;
return
len
;
...
@@ -98,7 +97,6 @@ pcm_convert_24(const struct audio_format *src_format,
...
@@ -98,7 +97,6 @@ pcm_convert_24(const struct audio_format *src_format,
{
{
const
int32_t
*
buf
;
const
int32_t
*
buf
;
size_t
len
;
size_t
len
;
size_t
dest_size
=
pcm_convert_size
(
src_format
,
src_size
,
dest_format
);
assert
(
dest_format
->
bits
==
24
);
assert
(
dest_format
->
bits
==
24
);
...
@@ -123,7 +121,7 @@ pcm_convert_24(const struct audio_format *src_format,
...
@@ -123,7 +121,7 @@ pcm_convert_24(const struct audio_format *src_format,
dest_format
->
sample_rate
,
dest_format
->
sample_rate
,
&
len
);
&
len
);
assert
(
dest_size
>=
len
);
assert
(
pcm_convert_size
(
src_format
,
src_size
,
dest_format
)
>=
len
);
memcpy
(
dest_buffer
,
buf
,
len
);
memcpy
(
dest_buffer
,
buf
,
len
);
return
len
;
return
len
;
...
...
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