Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ralph Giles
Opusfile
Commits
009ecafb
Commit
009ecafb
authored
Oct 08, 2012
by
Timothy B. Terriberry
Browse files
Fix a couple of MSVC warnings.
parent
e0d55f6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/internal.h
View file @
009ecafb
...
...
@@ -38,11 +38,14 @@ typedef opus_int16 op_sample;
typedef
float
op_sample
;
# endif
/*Disable excessive warnings about the order of operations.*/
# if OP_GNUC_PREREQ(4,2)
/*Disable excessive warnings about the order of operations.*/
# pragma GCC diagnostic ignored "-Wparentheses"
# elif defined(_MSC_VER)
/*Disable excessive warnings about the order of operations.*/
# pragma warning(disable:4554)
/*Disable warnings about "deprecated" POSIX functions.*/
# pragma warning(disable:4996)
# endif
# if OP_GNUC_PREREQ(3,0)
...
...
src/opusfile.c
View file @
009ecafb
...
...
@@ -1627,7 +1627,7 @@ static opus_int32 op_calc_bitrate(opus_int64 _bytes,ogg_int64_t _samples){
ogg_int64_t
den
;
if
(
OP_UNLIKELY
(
_bytes
/
(
0x7FFFFFFFF
/
(
48000
*
8
))
>=
_samples
))
return
0x7FFFFFFF
;
den
=
_samples
/
(
48000
*
8
);
return
(
_bytes
+
(
den
>>
1
))
/
den
;
return
(
opus_int32
)(
(
_bytes
+
(
den
>>
1
))
/
den
)
;
}
if
(
OP_UNLIKELY
(
_samples
<=
0
))
return
0x7FFFFFFF
;
/*This can't actually overflow in normal operation: even with a pre-skip of
...
...
Write
Preview
Supports
Markdown
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