i386. Add one more patch to the patch-warnings collection, to ensure warning-free compile on 64-bit platforms (tested on amd64).
156 lines
4.2 KiB
Text
156 lines
4.2 KiB
Text
Some patches to fix compiler warnings...
|
|
|
|
-mi
|
|
|
|
The mpeg_close method only does anything, if MMX was used. Do not even
|
|
declare nor define it, if that is not the case.
|
|
--- src/fame_decoder_mpeg.c Tue Jul 1 04:59:34 2003
|
|
+++ src/fame_decoder_mpeg.c Tue Jul 12 19:02:15 2005
|
|
@@ -79,5 +79,7 @@
|
|
static void mpeg_interpolate(fame_decoder_t *decoder, int rounding);
|
|
static void mpeg_leave(fame_decoder_t *decoder);
|
|
+#ifdef HAS_MMX
|
|
static void mpeg_close(fame_decoder_t *decoder);
|
|
+#endif
|
|
|
|
FAME_CONSTRUCTOR(fame_decoder_mpeg_t)
|
|
@@ -91,5 +93,9 @@
|
|
FAME_DECODER(this)->interpolate = mpeg_interpolate;
|
|
FAME_DECODER(this)->leave = mpeg_leave;
|
|
+#ifdef HAS_MMX
|
|
FAME_DECODER(this)->close = mpeg_close;
|
|
+#else
|
|
+ FAME_DECODER(this)->close = NULL;
|
|
+#endif
|
|
return(this);
|
|
}
|
|
@@ -604,4 +610,5 @@
|
|
}
|
|
|
|
+#ifdef HAS_MMX
|
|
/* mpeg_close */
|
|
/* */
|
|
@@ -619,5 +626,4 @@
|
|
fame_decoder_mpeg_t *decoder_mpeg = FAME_DECODER_MPEG(decoder);
|
|
|
|
-#ifdef HAS_MMX
|
|
/* free mismatch accumulator */
|
|
{
|
|
@@ -627,4 +633,4 @@
|
|
fame_free(decoder_mpeg->mismatch_accumulator[i]);
|
|
}
|
|
-#endif
|
|
}
|
|
+#endif
|
|
|
|
Include the missing header:
|
|
--- src/fame_rate_simple.c Mon Apr 8 11:58:05 2002
|
|
+++ src/fame_rate_simple.c Tue Jul 12 19:05:27 2005
|
|
@@ -20,4 +20,5 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h> /* strlen() */
|
|
#include <math.h>
|
|
#include "fame.h"
|
|
--- src/fame_rate_1param.c Sun May 12 14:34:45 2002
|
|
+++ src/fame_rate_1param.c Tue Jul 12 19:07:54 2005
|
|
@@ -20,4 +20,5 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h> /* strlen() */
|
|
#include <math.h>
|
|
#include "fame.h"
|
|
--- src/mae_mmx.h Mon May 20 14:58:06 2002
|
|
+++ src/mae_mmx.h Tue Jul 12 19:22:34 2005
|
|
@@ -19,8 +19,8 @@
|
|
*/
|
|
|
|
-static unsigned int MAE8x8_withmask(unsigned char *ref,
|
|
- unsigned char *input,
|
|
- unsigned char *shape,
|
|
- int pitch)
|
|
+static inline unsigned int
|
|
+MAE8x8_withmask(unsigned char *ref, unsigned char *input,
|
|
+ unsigned char *shape,
|
|
+ int pitch)
|
|
{
|
|
int dummy;
|
|
@@ -71,8 +71,8 @@
|
|
}
|
|
|
|
-static unsigned int MAE8x8_withoutmask(unsigned char *ref,
|
|
- unsigned char *input,
|
|
- unsigned char *shape,
|
|
- int pitch)
|
|
+static inline unsigned int
|
|
+MAE8x8_withoutmask(unsigned char *ref, unsigned char *input,
|
|
+ unsigned char *shape,
|
|
+ int pitch)
|
|
{
|
|
int dummy;
|
|
--- src/mae_int.h Mon May 20 14:58:06 2002
|
|
+++ src/mae_int.h Tue Jul 12 19:24:06 2005
|
|
@@ -19,8 +19,8 @@
|
|
*/
|
|
|
|
-static unsigned int MAE8x8_withmask(unsigned char *ref,
|
|
- unsigned char *input,
|
|
- unsigned char *shape,
|
|
- int pitch)
|
|
+static inline unsigned int
|
|
+MAE8x8_withmask(unsigned char *ref, unsigned char *input,
|
|
+ unsigned char *shape,
|
|
+ int pitch)
|
|
{
|
|
int j,i;
|
|
@@ -42,8 +42,9 @@
|
|
}
|
|
|
|
-static unsigned int MAE8x8_withoutmask(unsigned char *ref,
|
|
- unsigned char *input,
|
|
- unsigned char *shape,
|
|
- int pitch)
|
|
+static inline unsigned int
|
|
+MAE8x8_withoutmask(unsigned char *ref,
|
|
+ unsigned char *input,
|
|
+ unsigned char *shape,
|
|
+ int pitch)
|
|
{
|
|
int j,i;
|
|
--- src/fame_motion_pmvfast.c Sat Oct 5 08:44:47 2002
|
|
+++ src/fame_motion_pmvfast.c Tue Jul 12 19:28:52 2005
|
|
@@ -20,4 +20,5 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h> /* memcpy, memset */
|
|
#include "fame.h"
|
|
#include "fame_malloc.h"
|
|
@@ -922,5 +923,4 @@
|
|
fame_motion_vector_t *pvector_left, *pvector_topleft;
|
|
fame_motion_vector_t *pvector_top, *pvector_topright;
|
|
- unsigned int weight_left, weight_top, weight_topright;
|
|
|
|
unsigned char *shape;
|
|
--- src/fame_malloc.c Fri Jun 20 08:40:30 2003
|
|
+++ src/fame_malloc.c Tue Jul 12 19:59:14 2005
|
|
@@ -22,4 +22,6 @@
|
|
|
|
#include <stdlib.h>
|
|
+#include <stdio.h>
|
|
+#include <inttypes.h>
|
|
|
|
void* fame_malloc(size_t size)
|
|
@@ -37,7 +39,11 @@
|
|
|
|
ptr = (unsigned char*) malloc(size+ALIGN);
|
|
- aligned = (unsigned char*) (((unsigned int)ptr & (~(ALIGN-1))) + ALIGN );
|
|
+ if (ptr == NULL) {
|
|
+ perror("fame_malloc");
|
|
+ exit(1);
|
|
+ }
|
|
+ aligned = (unsigned char*) (((uintptr_t)ptr & (~(ALIGN-1))) + ALIGN );
|
|
padding = aligned - 1;
|
|
- *padding = (ALIGN-1) - ((unsigned int)ptr & (ALIGN-1));
|
|
+ *padding = (ALIGN-1) - ((uintptr_t)ptr & (ALIGN-1));
|
|
|
|
return ((void*)aligned);
|