diff options
author | tron <tron> | 2006-06-30 18:11:39 +0000 |
---|---|---|
committer | tron <tron> | 2006-06-30 18:11:39 +0000 |
commit | 0cfeba72aef37166b8ef44648edba0d58951ae61 (patch) | |
tree | edd4cd27c55613faeb545c02e3046dd5c31dd3e5 /multimedia/fxtv/patches/patch-ap | |
parent | 70651b56d1e48505de3c5c51d7cbe74646296b48 (diff) | |
download | pkgsrc-0cfeba72aef37166b8ef44648edba0d58951ae61.tar.gz |
Avoid lvalue cast to make this compile with GCC 4.x.
Diffstat (limited to 'multimedia/fxtv/patches/patch-ap')
-rw-r--r-- | multimedia/fxtv/patches/patch-ap | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/multimedia/fxtv/patches/patch-ap b/multimedia/fxtv/patches/patch-ap new file mode 100644 index 00000000000..668a9dbca74 --- /dev/null +++ b/multimedia/fxtv/patches/patch-ap @@ -0,0 +1,43 @@ +$NetBSD: patch-ap,v 1.1 2006/06/30 18:11:39 tron Exp $ + +--- videolib/videolib.c.orig 1999-11-03 02:22:04.000000000 +0000 ++++ videolib/videolib.c 2006-06-30 19:10:23.000000000 +0100 +@@ -479,9 +479,9 @@ + *(p++) = (*src16 >> 8) | (*src16 << 8); + src16++; + } +- for ( i = dst_line_pad; i > 0; i-- ) +- *(((VL_UINT8 *)p)++) = 0x00; +- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; ++ (void)memset(p, 0, dst_line_pad); ++ dst_line = (VL_UINT16 *)((VL_UINT8 *)dst_line + ++ dst->geom.bytes_per_line); + } + + src16 = dst_line = (VL_UINT16 *) dst->buf; +@@ -513,9 +513,9 @@ + if ( src_padded ) + src16 = (VL_UINT16 *)( (VL_UINT8 *)src16 + dst_line_pad ); + else +- for ( i = dst_line_pad; i > 0; i-- ) +- *(((VL_UINT8 *)dst)++) = 0x00; +- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; ++ (void)memset(p, 0, dst_line_pad); ++ dst_line = (VL_UINT16 *)((VL_UINT8 *)dst_line + ++ dst->geom.bytes_per_line); + } + + if ( !dst_swap_b ) { /* More ugliness */ +@@ -527,8 +527,10 @@ + *(p++) = (*src16 >> 8) | (*src16 << 8); + src16++; + } +- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; +- (VL_UINT8 *)src16 += dst->geom.bytes_per_line; ++ dst_line = (VL_UINT16 *)((VL_UINT8 *)dst_line + ++ dst->geom.bytes_per_line); ++ src16 = (VL_UINT16 *)((VL_UINT8 *)src16 + ++ dst->geom.bytes_per_line); + } + } + } |