OSDN Git Service

PR rtl-optimization/46366
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2010 14:11:39 +0000 (14:11 +0000)
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Nov 2010 14:11:39 +0000 (14:11 +0000)
        * gcc.target/i386/pr45352-2.c: Silence warnings by using appropriate
        casts.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166798 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr45352-2.c

index 3ef9ee0..1684d0f 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-16  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/46366
+       * gcc.target/i386/pr45352-2.c: Silence warnings by using appropriate
+       casts.
+
 2010-11-16  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/tree-ssa/ssa-fre-30.c: New testcase.
index 58713af..5f9ebb1 100644 (file)
@@ -40,9 +40,10 @@ typedef struct
 {
 int xvmc_last_slice_code;}
 mpeg2dec_accel_t;
-static bitstream_init (picture_t * picture, void *start)
+static int bitstream_init (picture_t * picture, void *start)
 {
   picture->bitstream_ptr = start;
+  return (int) (long) start;
 }
 static slice_xvmc_init (picture_t * picture, int code)
 {
@@ -55,7 +56,7 @@ static slice_xvmc_init (picture_t * picture, int code)
     picture->f_motion.ref
       [0]
       [0]
-      = forward_reference_frame->base + (offset ? picture->pitches[0] : 0);
+      = (char) (long) (forward_reference_frame->base + (offset ? picture->pitches[0] : 0));
   picture->f_motion.ref[0][1] = (offset);
   if (picture->picture_structure)
       picture->pitches[0] <<= picture->pitches[1] <<= 1;
@@ -90,7 +91,7 @@ void
 mpeg2_xvmc_slice
   (mpeg2dec_accel_t * accel, picture_t * picture, int code, uint8_t buffer,int mba_inc)
 {
-  xine_xvmc_t * xvmc = bitstream_init (picture, buffer);
+  xine_xvmc_t * xvmc = (xine_xvmc_t *) (long) bitstream_init (picture, (void *) (long) buffer);
   slice_xvmc_init (picture, code);
     while (1)
       {