mirror of
https://github.com/xiph/opus.git
synced 2025-05-29 14:49:14 +00:00
Fix an MSVC warning.
Microsoft Visual Studio 2010 warns about 'C4146: unary minus operator applied to unsigned type, result still unsigned' because of the '&-sizeof(void*)' in align(). This commit works around the warning by casting the size_t to int before negation. Patch by Hauke, who reported the issue on the opus mailing list. Reviewed by derf.
This commit is contained in:
parent
2b14ac23f1
commit
3a9b35453c
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011 Xiph.Org Foundation
|
||||
/* Copyright (c) 2012 Xiph.Org Foundation
|
||||
Written by Jean-Marc Valin */
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -77,7 +77,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 le
|
|||
/* Make sure everything's aligned to sizeof(void *) bytes */
|
||||
static inline int align(int i)
|
||||
{
|
||||
return (i+sizeof(void *)-1)&-sizeof(void *);
|
||||
return (i+sizeof(void *)-1)&-((int)sizeof(void *));
|
||||
}
|
||||
|
||||
opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue