Changeset 278

Show
Ignore:
Timestamp:
06/26/08 06:40:59 (4 months ago)
Author:
mattn
Message:

* fixed warnings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • GtkRadiant/trunk/plugins/entity/light.cpp

    r185 r278  
    244244  bool bIsSpotLight = !!target[0]; 
    245245  //!\todo Write an API for modules to register preference settings, and make this preference module-specific. 
    246   int nPasses = pref == 1 ? 3 : 2; 
     246 // int nPasses = pref == 1 ? 3 : 2; 
    247247 
    248248  g_QglTable.m_pfn_qglPushAttrib(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); 
     
    288288void DrawLight(entity_t* e, int nGLState, int pref, int nViewType) 
    289289{ 
    290   int i; 
     290//  int i; 
    291291  // top, bottom, tleft, tright, bright, bleft 
    292292  vec3_t points[6]; 
     
    480480      g_QglTable.m_pfn_qglEnable(GL_LINE_STIPPLE); 
    481481 
    482       float* envelope = (pref == 1) ? e->fLightEnvelope1 : e->fLightEnvelope2;  
     482      float* envelope = (pref == 1) ? e->fLightEnvelope1 : e->fLightEnvelope2; 
    483483      for (int iPass = 0; iPass < nPasses; iPass++) 
    484484      { 
  • GtkRadiant/trunk/plugins/imagem8/m32.cpp

    r195 r278  
    2727void LoadM32(const char *name, unsigned char **pic, int *width, int *height) 
    2828{ 
    29     FILE      *f; 
     29//    FILE            *f; 
    3030    m32_header_t        *m32_header; 
    3131    //rgb_t     *palette; 
    3232    int         i, num_pixels, size; 
    33     char      text_buf[255]; 
     33//    char    text_buf[255]; 
    3434    unsigned int        length; 
    3535    unsigned char       *palette_ent, *buf_temp; 
     
    3737 
    3838    // open file 
    39     if ( length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer, 0) == (unsigned int) -1) 
     39    if ( (length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer, 0)) == (unsigned int) -1) 
    4040    { 
    4141        Sys_Printf("Unable to open file %s\n",name); 
  • GtkRadiant/trunk/plugins/imagem8/m8.cpp

    r195 r278  
    2727void LoadM8(const char *name, unsigned char **pic, int *width, int *height) 
    2828{ 
    29     FILE      *f; 
     29//    FILE            *f; 
    3030    m8_header_t *m8_header; 
    3131    rgb_t       *palette; 
     
    4545 
    4646    // open file 
    47         if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0) == (unsigned int) -1) 
     47        if ( (length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0)) == (unsigned int) -1) 
    4848    { 
    4949        strcpy(text_buf, name); 
     
    6363        } 
    6464    } 
    65      
     65 
    6666    m8_header = (m8_header_t *)m8_file_buffer; 
    6767 
  • GtkRadiant/trunk/plugins/imagewal/wal.cpp

    r195 r278  
    3131void LoadWAL(const char *name, unsigned char **pic, int *width, int *height) 
    3232{ 
    33     FILE      *f; 
     33//    FILE            *f; 
    3434    miptex_t    *wal_header; 
    35     rgb_t     *palette; 
     35//    rgb_t   *palette; 
    3636    int         i, num_pixels, size; 
    37     char      text_buf[255]; 
     37//    char    text_buf[255]; 
    3838    unsigned int        length; 
    3939    unsigned char       *palette_ent, *buf_temp; 
     
    4141 
    4242    // open file 
    43     if ( length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer, 0) == (unsigned int) -1) 
     43    if ( (length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer, 0)) == (unsigned int) -1) 
    4444    { 
    4545        Sys_Printf("Unable to open file %s\n",name); 
  • GtkRadiant/trunk/plugins/map/parse.cpp

    r185 r278  
    570570{ 
    571571  brush_t *pBrush; 
    572   CPtrArray *brushes = NULL; 
     572//  CPtrArray *brushes = NULL; 
    573573  char temptoken[1024]; 
    574574 
  • GtkRadiant/trunk/plugins/map/write.cpp

    r185 r278  
    5353  out->printf("patchDef2\n{\n%s\n( %i %i 0 0 0 )\n", 
    5454    str, pPatch->width, pPatch->height); 
    55    
     55 
    5656  // write matrix 
    5757  out->printf("(\n"); 
     
    118118  { 
    119119    char *pos; 
    120         while ( pos = (char*)strchr( str, '/' ) ) { 
     120        while ( (pos = (char*)strchr( str, '/' )) != NULL ) { 
    121121                str = pos+1; // to speed optimize, change the "while" to an "if" 
    122122        } 
  • GtkRadiant/trunk/plugins/shaders/plugin.cpp

    r185 r278  
    33All rights reserved. 
    44 
    5 Redistribution and use in source and binary forms, with or without modification,  
     5Redistribution and use in source and binary forms, with or without modification, 
    66are permitted provided that the following conditions are met: 
    77 
    8 Redistributions of source code must retain the above copyright notice, this list  
     8Redistributions of source code must retain the above copyright notice, this list 
    99of conditions and the following disclaimer. 
    1010 
     
    1313other materials provided with the distribution. 
    1414 
    15 Neither the name of Loki software nor the names of its contributors may be used  
    16 to endorse or promote products derived from this software without specific prior  
    17 written permission.  
     15Neither the name of Loki software nor the names of its contributors may be used 
     16to endorse or promote products derived from this software without specific prior 
     17written permission. 
    1818 
    19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''  
    20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE  
    21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  
    22 DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY  
    23 DIRECT,INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES  
    24 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  
    25 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON  
    26 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  
    27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS  
    28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
     19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 
     20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
     22DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY 
     23DIRECT,INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
     24(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
     25LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
     26ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     27(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
     28SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2929*/ 
    3030 
     
    4747_QERBrushTable g_BrushTable; 
    4848 
    49 static bool g_bInterfaceInitDone = false; 
     49// static bool g_bInterfaceInitDone = false; 
    5050 
    5151// ============================================================================= 
     
    5555CSynapseClientShaders g_SynapseClient; 
    5656 
    57 static const XMLConfigEntry_t entries[] =  
    58   {  
     57static const XMLConfigEntry_t entries[] = 
     58  { 
    5959    { SHADERS_MAJOR, SYN_PROVIDE, sizeof(_QERShadersTable), NULL }, 
    6060    { VFS_MAJOR, SYN_REQUIRE, sizeof(g_VFSTable), &g_VFSTable }, 
     
    7676  g_pSynapseServer->IncRef(); 
    7777  Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); 
    78    
     78 
    7979  if ( !g_SynapseClient.ConfigXML( pServer, NULL, entries ) ) { 
    8080    return NULL; 
    8181  } 
    82    
     82 
    8383  g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1), SYN_REQUIRE, &g_FuncTable); 
    8484  g_SynapseClient.AddAPI(DATA_MAJOR, NULL, sizeof(_QERAppDataTable), SYN_REQUIRE, &g_DataTable); 
  • GtkRadiant/trunk/plugins/surface/surfacedialog.cpp

    r264 r278  
    220220  texdef_t* tmp_texdef; 
    221221  texdef_to_face_t* temp_texdef_face_list; 
    222   char buf[12]; 
     222//  char buf[12]; 
    223223  char texture_name[128]; 
    224224 
     
    258258    temp_texdef_face_list = get_texdef_face_list()->next; 
    259259 
    260     for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
     260    for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
    261261    { 
    262262      tmp_texdef = &temp_texdef_face_list->texdef; 
     
    316316  char blank[1]; 
    317317  GList *items = NULL; 
    318   GList *tmp_item; 
     318//  GList *tmp_item; 
    319319  int num_of_list_items = 0; 
    320320 
     
    382382  if (!texdef_face_list_empty()) 
    383383  { 
    384     texdef_to_face_t* p = get_texdef_face_list(); 
     384//    texdef_to_face_t* p = get_texdef_face_list(); 
    385385    GetSelFacesTexdef( get_texdef_face_list() ); 
    386386  } 
     
    18631863{ 
    18641864  texdef_t* tmp_texdef; 
    1865   texdef_t* tmp_orig_texdef; 
     1865//  texdef_t* tmp_orig_texdef; 
    18661866  texdef_to_face_t* temp_texdef_face_list; 
    18671867 
  • GtkRadiant/trunk/plugins/surface_heretic2/surfacedialog.cpp

    r264 r278  
    263263    temp_texdef_face_list = get_texdef_face_list()->next; 
    264264 
    265     for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
     265    for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
    266266    { 
    267267      tmp_texdef = &temp_texdef_face_list->texdef; 
  • GtkRadiant/trunk/plugins/surface_quake2/surfacedialog.cpp

    r264 r278  
    225225  texdef_t* tmp_texdef; 
    226226  texdef_to_face_t* temp_texdef_face_list; 
    227   char buf[12]; 
     227//  char buf[12]; 
    228228  char texture_name[128]; 
    229229 
     
    263263    temp_texdef_face_list = get_texdef_face_list()->next; 
    264264 
    265     for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
     265    for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
    266266    { 
    267267      tmp_texdef = &temp_texdef_face_list->texdef; 
     
    321321  char blank[1]; 
    322322  GList *items = NULL; 
    323   GList *tmp_item; 
     323//  GList *tmp_item; 
    324324  int num_of_list_items = 0; 
    325325 
     
    387387  if (!texdef_face_list_empty()) 
    388388  { 
    389     texdef_to_face_t* p = get_texdef_face_list(); 
     389//    texdef_to_face_t* p = get_texdef_face_list(); 
    390390    GetSelFacesTexdef( get_texdef_face_list() ); 
    391391  } 
     
    18761876{ 
    18771877  texdef_t* tmp_texdef; 
    1878   texdef_t* tmp_orig_texdef; 
     1878//  texdef_t* tmp_orig_texdef; 
    18791879  texdef_to_face_t* temp_texdef_face_list; 
    18801880 
  • GtkRadiant/trunk/plugins/surface_ufoai/surfacedialog.cpp

    r264 r278  
    263263    temp_texdef_face_list = get_texdef_face_list()->next; 
    264264 
    265     for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
     265    for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) 
    266266    { 
    267267      tmp_texdef = &temp_texdef_face_list->texdef; 
  • GtkRadiant/trunk/radiant/texwindow.cpp

    r264 r278  
    265265    texturing = false; 
    266266    break; 
     267  default: 
     268    return; 
    267269  } 
    268270