Changeset 40


Ignore:
Timestamp:
Mar 2, 2008, 12:52:07 AM (10 years ago)
Author:
Sam Hocevar
Message:
  • Fix a few more warnings.
  • Remove -Wshadow from the warnings because it is too verbose for now.
  • Remove warning flags that have no meaning in C++.
Location:
abuse/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/configure.ac

    r37 r40  
    4545CPPFLAGS="${CPPFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
    4646# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    47 CPPFLAGS="${CPPFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
     47CPPFLAGS="${CPPFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Waggregate-return -Wsign-compare"
    4848
    4949dnl Checks for header files
  • abuse/trunk/src/dev.cpp

    r39 r40  
    20972097          if (!mess_win)
    20982098          {
    2099             mess_win=file_dialog(eh,symbol_str("saveas_name"),current_level ? current_level->name() : (char *)"untitled.spe",
     2099            mess_win=file_dialog(eh,symbol_str("saveas_name"),current_level ? current_level->name() : "untitled.spe",
    21002100                               ID_LEVEL_SAVEAS_OK,symbol_str("ok_button"),
    21012101                                 ID_CANCEL,symbol_str("cancel_button"),
  • abuse/trunk/src/imlib/gifread.cpp

    r17 r40  
    1414
    1515
    16 struct {
     16struct GifScreen {
    1717        uint16_t        Width;
    1818        uint16_t        Height;
     
    2424} GifScreen;
    2525
    26 struct {
     26struct gif_screen {
    2727  uint16_t w,h;
    2828  uint8_t color_info,background,reserved;
    2929} gif_screen;
    3030
    31 struct {
     31struct gif_image {
    3232  uint16_t xoff,yoff,w,h;
    3333  uint8_t color_info;
  • abuse/trunk/src/imlib/jmalloc.cpp

    r39 r40  
    203203  for (;f;f=f->next,i++)
    204204  {   
    205     fprintf(fp,"%4d   %p (%d) %4d      ",i,f,((char *)f-(char *)sfirst),f->size);
     205    fprintf(fp, "%4d   %p (%ld) %4ld      ",
     206            i, f, (long int)((char *)f - (char *)sfirst), (long int)f->size);
    206207#ifdef MEM_CHECK
    207208    if (f->size>0)
     
    236237
    237238
    238   fprintf(fp,"************** CACHE SPACE ******************\n",block_size);
     239  fprintf(fp,"************** CACHE SPACE %i ******************\n", block_size);
    239240  i=0;
    240241  for (f=cfirst;f;f=f->next,i++)
     
    690691    "    DOS users  : Remove any TSR's and device drivers you can.\n"
    691692    "    UNIX users : Do you have a swapfile/partition setup?\n";
     693#ifdef __WATCOMC__
    692694static char const *not_enough_low_memory_message =
    693695    "Memory Manager : Not enough low memory available (%d : need %d)\n"
     
    696698    "    - remove TSRs & drivers not needed by ABUSE\n"
    697699    "    - add memory to your system\n";
     700#endif
    698701
    699702void jmalloc_init(int32_t min_size)
  • abuse/trunk/src/imlib/targa.cpp

    r17 r40  
    4343  int h=fp->read_uint16();
    4444  uint8_t bpp=fp->read_uint8();
    45   uint8_t im_des=fp->read_uint8();
     45  fp->read_uint8(); // im_des
    4646
    4747  if (bpp!=32)
  • abuse/trunk/src/loader2.cpp

    r39 r40  
    282282        color_table=NULL;
    283283
     284# if 0
    284285        int should_save_sd_cache = 0;
    285286
    286 # if 0
    287287        char *cachepath;
    288288        cachepath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + 12 + 1, "cachepath" );
  • abuse/trunk/src/net/include/tcpip.hpp

    r39 r40  
    4545  {
    4646    if (who->protocol_type()==IP &&
    47         !memcmp(&addr.sin_addr,& ((ip_address *)who)->addr.sin_addr,sizeof(addr.sin_addr)))
     47        !memcmp(&addr.sin_addr,& ((ip_address const *)who)->addr.sin_addr,sizeof(addr.sin_addr)))
    4848      return 1;
    4949    else return 0;
  • abuse/trunk/src/net/tcpip.cpp

    r39 r40  
    365365    // got a notification request "broadcast"
    366366    ip_address *addr;
     367    net_address *tmp;
    367368
    368369#ifdef TCPIP_DEBUG
     
    370371#endif
    371372
    372     len = notifier->read(buf, 512, (net_address**)&addr);
     373    len = notifier->read(buf, 512, &tmp);
     374    addr = (ip_address *)tmp;
    373375#ifdef TCPIP_DEBUG
    374376                if (len>0) {
     
    510512    // got a notification response
    511513    ip_address *addr;
     514    net_address *tmp;
    512515
    513516#ifdef TCPIP_DEBUG
     
    515518#endif
    516519
    517     len = responder->read(buf, 512, (net_address**)&addr);
     520    len = responder->read(buf, 512, &tmp);
     521    addr = (ip_address *)tmp;
    518522
    519523#ifdef TCPIP_DEBUG
  • abuse/trunk/src/objects.cpp

    r39 r40  
    268268                current_object = this;
    269269                void *m = mark_heap( TMP_SPACE );
    270                 void *ret = eval_function( (lisp_symbol *)ns, NULL );
     270                (void)eval_function( (lisp_symbol *)ns, NULL );
    271271                restore_heap( m, TMP_SPACE );
    272272        }
     
    734734  else
    735735  {
    736     view *v=controller();
     736    //view *v=controller();
    737737
    738738    if (fade_count())     
     
    931931    int fxv=sfxvel(),fyv=sfyvel();
    932932    fxv+=fxa;  fyv+=fya;   
    933     int32_t xv=xvel()+xa+(fxv>>8);
     933    //int32_t xv=xvel()+xa+(fxv>>8);
    934934    set_xvel(xvel()+xa+(fxv>>8));
    935935    set_yvel(yvel()+ya+(fyv>>8));
     
    14531453    int fxv=sfxvel(),fyv=sfyvel();
    14541454    fxv+=fxa;  fyv+=fya;   
    1455     int32_t xv=xvel()+xa+(fxv>>8);
     1455    //int32_t xv=xvel()+xa+(fxv>>8);
    14561456    set_xvel(xvel()+xa+(fxv>>8));
    14571457    set_yvel(yvel()+ya+(fyv>>8));
  • abuse/trunk/src/property.cpp

    r39 r40  
    131131        fprintf(fp,"\"%s\"\n",i->def_str);
    132132      else
    133         fprintf(fp,"%g\n",i->def_num);     
     133        fprintf(fp,"%d\n",i->def_num);     
    134134    }
    135135    fclose(fp);
  • abuse/trunk/src/view.cpp

    r39 r40  
    169169
    170170#ifdef __WATCOMC__
    171 char *get_login()
     171char const *get_login()
    172172{  if (cur_user_name[0]) return cur_user_name; else return "DOS user"; }
    173173
     
    175175#elif defined( __APPLE__ )
    176176
    177 char *get_login()
     177char const *get_login()
    178178{  if (cur_user_name[0]) return cur_user_name; else return "Mac user"; }
    179179
    180180#else
    181 char *get_login()
    182 {  if (cur_user_name[0]) return cur_user_name; else return (getlogin() ? getlogin() : (char *)"unknown"); }
     181char const *get_login()
     182{  if (cur_user_name[0]) return cur_user_name; else return (getlogin() ? getlogin() : "unknown"); }
    183183
    184184#endif
Note: See TracChangeset for help on using the changeset viewer.