Fix or supress some warnings

This commit is contained in:
Henrik Rydgård 2024-04-12 10:35:00 +02:00
parent c43442f801
commit 88a00f62b9
4 changed files with 9 additions and 6 deletions

View File

@ -134,7 +134,7 @@ void ff_atrac_iqmf(float *inlo, float *inhi, unsigned int nIn, float *pOut,
p3 = temp + 46;
/* loop1 */
for(i=0; i<nIn; i+=2){
for(i=0; i<(int)nIn; i+=2){
p3[2*i+0] = inlo[i ] + inhi[i ];
p3[2*i+1] = inlo[i ] - inhi[i ];
p3[2*i+2] = inlo[i+1] + inhi[i+1];
@ -143,7 +143,7 @@ void ff_atrac_iqmf(float *inlo, float *inhi, unsigned int nIn, float *pOut,
/* loop2 */
p1 = temp;
for (j = nIn; j != 0; j--) {
for (j = (int)nIn; j != 0; j--) {
float s1 = 0.0;
float s2 = 0.0;

View File

@ -74,8 +74,11 @@ void av_log(int level, const char *fmt, ...) av_printf_format(3, 4);
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
#ifdef _MSC_VER
#pragma warning(disable:4305)
#pragma warning(disable:4244)
#pragma warning(disable:4101) // unused variable
#endif
#define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff))
#define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))

View File

@ -99,12 +99,12 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, AVRounding rnd)
a0 = a0 * b0 + t1a;
a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a);
a0 += r;
a1 += a0 < r;
a1 += (int64_t)a0 < r;
for (i = 63; i >= 0; i--) {
a1 += a1 + ((a0 >> i) & 1);
t1 += t1;
if (c <= a1) {
if (c <= (int64_t)a1) {
a1 -= c;
t1++;
}

View File

@ -50,7 +50,7 @@ int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_real
memcpy(ptr, &val, sizeof(val));
if (!val)
min_size = 0;
*size = min_size;
*size = (unsigned int)min_size;
return 1;
}
@ -204,7 +204,7 @@ void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
if (!ptr)
min_size = 0;
*size = min_size;
*size = (unsigned int)min_size;
return ptr;
}