PennMUSH Community

Changeset 841

Show
Ignore:
Timestamp:
05/15/07 11:46:49 (2 years ago)
Author:
shawnw
Message:

#7324: // comments and other warnings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/branches/devel/CHANGES.182

    r838 r841  
    1919Minor changes: 
    2020  * Removed the gmalloc malloc option. [SW] 
     21  * Assorted gcc warning fixes. [SW] 
    2122 
    2223Version 1.8.2 patchlevel 4                      May ??, 2007 
  • 1.8.3/branches/devel/hdrs/ansi.h

    r660 r841  
    7777void init_ansi_codes(void); 
    7878 
     79#ifdef HAVE_STDINT_H 
     80#include <stdint.h> 
     81#endif 
     82 
    7983struct ansi_data { 
    80   char bits; 
    81   char offbits; 
     84  uint8_t bits; 
     85  uint8_t offbits; 
    8286  char fore; 
    8387  char back; 
  • 1.8.3/branches/devel/src/funlist.c

    r803 r841  
    26172617/* string, regexp, replacement string. Acts like sed or perl's s///g, 
    26182618 * with an ig version */ 
    2619 // int re_subpatterns = -1;  /**< Number of subpatterns in regexp */ 
    2620 // int *re_offsets;       /**< Array of offsets to subpatterns */ 
    2621 // char *re_from = NULL;          /**< Pointer to last match position */ 
    26222619FUNCTION(fun_regreplace) 
    26232620{ 
  • 1.8.3/branches/devel/src/funmath.c

    r807 r841  
    12751275 
    12761276  if (fabs(denom - 1) < 1.0e-10) 
    1277     safe_format(buff, bp, "%.0lf", num); 
     1277    safe_format(buff, bp, "%.0f", num); 
    12781278  else 
    1279     safe_format(buff, bp, "%.0lf/%.0lf", num, denom); 
     1279    safe_format(buff, bp, "%.0f/%.0f", num, denom); 
    12801280} 
    12811281 
  • 1.8.3/branches/devel/src/funtime.c

    r815 r841  
    239239    str2[i] = '\0'; 
    240240    if (!*str1) { 
    241       *secs += parse_integer(str2); // no more chars, just add seconds and stop 
     241      *secs += parse_integer(str2); /* no more chars, just add seconds and stop */ 
    242242      break; 
    243243    } 
     
    245245    case 'd': 
    246246    case 'D': 
    247       *secs += (parse_integer(str2) * 86400);   // days 
     247      *secs += (parse_integer(str2) * 86400);   /* days */ 
    248248      break; 
    249249    case 'h': 
    250250    case 'H': 
    251       *secs += (parse_integer(str2) * 3600);    // hours 
     251      *secs += (parse_integer(str2) * 3600);    /* hours */ 
    252252      break; 
    253253    case 'm': 
    254254    case 'M': 
    255       *secs += (parse_integer(str2) * 60);  // minutes 
     255      *secs += (parse_integer(str2) * 60);  /* minutes */ 
    256256      break; 
    257257    case 's': 
    258258    case 'S': 
    259259    case ' ': 
    260       *secs += parse_integer(str2); // seconds 
     260      *secs += parse_integer(str2); /* seconds */ 
    261261      break; 
    262262    default: 
    263263      return 0; 
    264264    } 
    265     str1++;         // move past the time char 
     265    str1++;         /* move past the time char */ 
    266266  } 
    267267  return 1; 
  • 1.8.3/branches/devel/src/markup.c

    r807 r841  
    10701070  bi = (markup_information *) b; 
    10711071 
    1072   // if (ai->start == bi->start) return ai->priority - bi->priority; 
    10731072  return ai->start - bi->start; 
    10741073} 
  • 1.8.3/branches/devel/src/notify.c

    r790 r841  
    301301      bp = tbuf; 
    302302      safe_str((char *) messages[type].message, tbuf, &bp); 
    303       safe_chr(IAC, tbuf, &bp); 
    304       safe_chr(GOAHEAD, tbuf, &bp); 
     303      safe_chr((char)IAC, tbuf, &bp); 
     304      safe_chr((char)GOAHEAD, tbuf, &bp); 
    305305      *bp = '\0'; 
    306306      return (unsigned char *) tbuf; 
     
    341341      bp = tbuf; 
    342342      safe_str((char *) messages[type].message, tbuf, &bp); 
    343       safe_chr(IAC, tbuf, &bp); 
    344       safe_chr(GOAHEAD, tbuf, &bp); 
     343      safe_chr((char)IAC, tbuf, &bp); 
     344      safe_chr((char)GOAHEAD, tbuf, &bp); 
    345345      *bp = '\0'; 
    346346      return (unsigned char *) tbuf; 
     
    358358      case IAC: 
    359359    if (type == NA_TPASCII) 
    360       safe_str("\xFF\xFF", t, &o); 
     360      safe_strl("\xFF\xFF", 2, t, &o); 
    361361    else if (strip) 
    362362      safe_str(accent_table[IAC].base, t, &o); 
     
    375375    break; 
    376376      case '\n': 
    377     safe_str("\r\n", t, &o); 
     377    safe_strl("\r\n", 2, t, &o); 
    378378    break; 
    379379      default: 
     
    391391      bp = tbuf; 
    392392      safe_str((char *) messages[type].message, tbuf, &bp); 
    393       safe_chr(IAC, tbuf, &bp); 
    394       safe_chr(GOAHEAD, tbuf, &bp); 
     393      safe_chr((char)IAC, tbuf, &bp); 
     394      safe_chr((char)GOAHEAD, tbuf, &bp); 
    395395      *bp = '\0'; 
    396396      return (unsigned char *) tbuf; 
     
    420420    } 
    421421    if (type == NA_TANSI || type == NA_TCOLOR) 
    422       safe_str("\xFF\xFF", t, &o); 
     422      safe_strl("\xFF\xFF", 2, t, &o); 
    423423    else if (strip && accent_table[IAC].base) 
    424424      safe_str(accent_table[IAC].base, t, &o); 
     
    524524    bp = tbuf; 
    525525    safe_str((char *) messages[type].message, tbuf, &bp); 
    526     safe_chr(IAC, tbuf, &bp); 
    527     safe_chr(GOAHEAD, tbuf, &bp); 
     526    safe_chr((char)IAC, tbuf, &bp); 
     527    safe_chr((char)GOAHEAD, tbuf, &bp); 
    528528    *bp = '\0'; 
    529529    return (unsigned char *) tbuf; 
  • 1.8.3/branches/devel/src/services.c

    r758 r841  
    1 /* Win32 services routines */ 
    2  
    3 /* Author: Nick Gammon */ 
    4  
    5 #ifdef WIN32 
     1/** \file services.c 
     2 * \brief Win32 services routines  
     3 * 
     4 * Original author: Nick Gammon  
     5 */ 
    66 
    77#include "copyrite.h" 
    88#include "config.h" 
    99 
     10#ifdef WIN32 
    1011#include <windows.h>        /* for service and thread routines */ 
    1112 
  • 1.8.3/branches/devel/src/set.c

    r817 r841  
    887887    } 
    888888  } else { 
    889     // We don't do it - we just pemit it. 
     889    /* We don't do it - we just pemit it. */ 
    890890    if (!ansi_long_flag && ShowAnsi(player)) 
    891891      notify_format(player, "%s - Set: %s", AL_NAME(a), tbuf_ansi);