[PATCH] Fix warnings in ljoy.c and tga.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


---
 src/linux/ljoy.c |  7 -------
 src/tga.c        | 10 +++++-----
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/linux/ljoy.c b/src/linux/ljoy.c
index 12e2306..75c49bb 100644
--- a/src/linux/ljoy.c
+++ b/src/linux/ljoy.c
@@ -53,9 +53,6 @@ static int joy_init(void)
    AL_CONST char *device_name = NULL;
    char tmp[128], tmp1[128], tmp2[128];
    unsigned int raw_version;
-   struct {
-      unsigned char build, minor, major;
-   } version;
    char num_axes, num_buttons;
    int throttle;
    int i, s, a, b;
@@ -97,10 +94,6 @@ static int joy_init(void)
          return -1; 
       }
       
-      version.major = (raw_version & 0xFF0000) >> 16;
-      version.minor = (raw_version & 0xFF00) >> 8;
-      version.build = (raw_version & 0xFF);
-      
       ioctl(joy_fd[i], JSIOCGAXES, &num_axes);
       ioctl(joy_fd[i], JSIOCGBUTTONS, &num_buttons);
 
diff --git a/src/tga.c b/src/tga.c
index d40762e..2340fbb 100644
--- a/src/tga.c
+++ b/src/tga.c
@@ -280,8 +280,8 @@ BITMAP *load_tga_pf(PACKFILE *f, RGB *pal)
    unsigned char image_id[256], image_palette[256][3];
    unsigned char id_length, palette_type, image_type, palette_entry_size;
    unsigned char bpp, descriptor_bits;
-   short unsigned int first_color, palette_colors;
-   short unsigned int left, top, image_width, image_height;
+   short unsigned int palette_colors;
+   short unsigned int image_width, image_height;
    unsigned int c, i, y, yc;
    int dest_depth;
    int compressed;
@@ -299,11 +299,11 @@ BITMAP *load_tga_pf(PACKFILE *f, RGB *pal)
    id_length = pack_getc(f);
    palette_type = pack_getc(f);
    image_type = pack_getc(f);
-   first_color = pack_igetw(f);
+   /* first_color */ pack_igetw(f);
    palette_colors  = pack_igetw(f);
    palette_entry_size = pack_getc(f);
-   left = pack_igetw(f);
-   top = pack_igetw(f);
+   /* left */ pack_igetw(f);
+   /* top  */ pack_igetw(f);
    image_width = pack_igetw(f);
    image_height = pack_igetw(f);
    bpp = pack_getc(f);
-- 
2.4.3


--------------020905040608080505050809--




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/