Merge pull request #26 from lfasnacht/warnings_fix

Fix warnings and compile with -Werror
This commit is contained in:
Marko Viitanen 2014-04-14 11:30:37 +03:00
commit 0e7a5057d1
3 changed files with 3 additions and 4 deletions

View file

@ -5,7 +5,7 @@ ifeq (, $(ARCH))
endif endif
SYSTEM = $(shell uname -s) SYSTEM = $(shell uname -s)
ASMFLAGS = ASMFLAGS =
DFLAGS = -O2 -g DFLAGS = -O2 -g -Werror
# ARCH related flags # ARCH related flags
ifeq ($(ARCH), x86_64) ifeq ($(ARCH), x86_64)

View file

@ -386,7 +386,7 @@ int main(int argc, char *argv[])
fgetpos(output,(fpos_t*)&curpos); fgetpos(output,(fpos_t*)&curpos);
// Print statistics of the coding // Print statistics of the coding
fprintf(stderr, " Processed %d frames, %10lld bits AVG PSNR: %2.4f %2.4f %2.4f\n", encoder->frame, curpos<<3, fprintf(stderr, " Processed %d frames, %10llu bits AVG PSNR: %2.4f %2.4f %2.4f\n", encoder->frame, (long long unsigned int) curpos<<3,
psnr[0] / encoder->frame, psnr[1] / encoder->frame, psnr[2] / encoder->frame); psnr[0] / encoder->frame, psnr[1] / encoder->frame, psnr[2] / encoder->frame);
fprintf(stderr, " Total time: %.3f s.\n", ((float)(clock() - start_time)) / CLOCKS_PER_SEC); fprintf(stderr, " Total time: %.3f s.\n", ((float)(clock() - start_time)) / CLOCKS_PER_SEC);

View file

@ -227,8 +227,7 @@ int picture_list_rem(picture_list *list, unsigned n, int8_t destroy)
list->used_size--; list->used_size--;
} else { } else {
// Shift all following pics one backward in the list // Shift all following pics one backward in the list
int i; for (; n < list->used_size - 1; ++n) {
for (i = n; n < list->used_size - 1; ++n) {
list->pics[n] = list->pics[n + 1]; list->pics[n] = list->pics[n + 1];
} }
list->pics[list->used_size - 1] = NULL; list->pics[list->used_size - 1] = NULL;