Changeset 6176

Show
Ignore:
Timestamp:
2008-04-30 05:12:52 (2 months ago)
Author:
flynd
Message:

Fixed some compiler warnings. Some unused variables and a few ugly casts to workaround that CDK lib parameters aren't defined as const when they should be.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/console/src/console.cpp

    r4526 r6176  
    128128 * CLicqConsole::Constructor 
    129129 *-------------------------------------------------------------------------*/ 
    130 CLicqConsole::CLicqConsole(int argc, char **argv
     130CLicqConsole::CLicqConsole(int /* argc */, char** /* argv */
    131131{ 
    132132  CWindow::StartScreen(); 
     
    990990      win->wprintf("%A%CSearch complete.\n", m_cColorInfo->nAttr, m_cColorInfo->nColor); 
    991991    } 
    992     else if (e->SearchAck()->More() == -1) 
     992    else if (static_cast<long>(e->SearchAck()->More()) == -1) 
    993993    { 
    994994      win->wprintf("%A%CSearch complete.  More users found, narrow search.\n", 
     
    21122112 * CLicqConsole::UserCommand_SetAutoResponse 
    21132113 *-------------------------------------------------------------------------*/ 
    2114 void CLicqConsole::UserCommand_SetAutoResponse(const char *szId, unsigned long nPPID, char *) 
     2114void CLicqConsole::UserCommand_SetAutoResponse(const char* /* szId */, unsigned long /* nPPID */, char *) 
    21152115{ 
    21162116  // First put this console into edit mode 
  • trunk/console/src/console.h

    r4526 r6176  
    222222struct SCommand 
    223223{ 
    224   char *szName; 
     224  const char* szName; 
    225225  void (CLicqConsole::*fProcessCommand)(char *); 
    226226  void (CLicqConsole::*fProcessTab)(char *, struct STabCompletion &); 
    227   char *szHelp; 
    228   char *szDescription; 
     227  const char* szHelp; 
     228  const char* szDescription; 
    229229}; 
    230230extern const unsigned short NUM_COMMANDS; 
  • trunk/console/src/console_menu.cpp

    r4526 r6176  
    111111 * Callback function for when SPACE is pressed on the cdkUserList 
    112112 *-------------------------------------------------------------------------*/ 
    113 int CLicqConsole::MenuPopupWrapper(EObjectType cdktype, void *object, void *clientData, chtype key
     113int CLicqConsole::MenuPopupWrapper(EObjectType /* cdktype */, void* /* object */, void* clientData, chtype /* key */
    114114{ 
    115115  CLicqConsole *me = (CLicqConsole *)clientData; 
     
    178178 * CLicqConsole::MenuList 
    179179 *-------------------------------------------------------------------------*/ 
    180 void CLicqConsole::MenuList(char *_szArg
     180void CLicqConsole::MenuList(char* /* _szArg */
    181181{ 
    182182  int userSelected; 
     
    255255 * CLicqConsole::MenuPlugins 
    256256 *-------------------------------------------------------------------------*/ 
    257 void CLicqConsole::MenuPlugins(char *_szArg
     257void CLicqConsole::MenuPlugins(char* /* _szArg */
    258258{ 
    259259  PluginsList l; 
  • trunk/console/src/console_print.cpp

    r4588 r6176  
    373373void CLicqConsole::PrintUsers() 
    374374{ 
    375   char *title = "<C></B/40>Contacts"; 
    376   char *ulist[1024]; 
     375  const char* title = "<C></B/40>Contacts"; 
     376  const char* ulist[1024]; 
    377377  int i = 0; 
    378378  struct SScrollUser *s = NULL; 
     
    403403  { 
    404404    cdkUserList = newCDKScroll(winUsers->CDKScreen(), 0, 0,  
    405                                RIGHT, LINES - 5, USER_WIN_WIDTH, title
    406                                ulist, i, FALSE, A_NORMAL, TRUE, TRUE); 
     405                               RIGHT, LINES - 5, USER_WIN_WIDTH, const_cast<char*>(title)
     406                               const_cast<char**>(ulist), i, FALSE, A_NORMAL, TRUE, TRUE); 
    407407  } 
    408408  else 
    409409  { 
    410     setCDKScrollItems (cdkUserList, ulist, i, FALSE); 
     410    setCDKScrollItems (cdkUserList, const_cast<char**>(ulist), i, FALSE); 
    411411  } 
    412412   
     
    452452 * CLicqConsole::UserListCallback 
    453453 *-------------------------------------------------------------------------*/ 
    454 int CLicqConsole::UserListCallback(EObjectType cdktype, void *object, void *clientData, chtype input) 
     454int CLicqConsole::UserListCallback(EObjectType /* cdktype */, void* /* object */, void *clientData, chtype input) 
    455455{ 
    456456  CLicqConsole *me = (CLicqConsole *)clientData;  
     
    466466  char title[256]; 
    467467  snprintf(title, 256, "<C></B/40>%s", _szAlias); 
    468   char *list[10000]; 
     468  const char* list[10000]; 
    469469  int i = 0; 
    470470 
     
    474474  cdkContactPopup = newCDKScroll(winMain->CDKScreen(), 0, 0, 
    475475                                 RIGHT, 10, 20, title, 
    476                                  list, i, FALSE, A_REVERSE, TRUE, TRUE); 
    477  
    478   setCDKScrollBackgroundColor(cdkContactPopup, "</40>"); 
     476                                 const_cast<char**>(list), i, FALSE, A_REVERSE, TRUE, TRUE); 
     477 
     478  setCDKScrollBackgroundColor(cdkContactPopup, const_cast<char*>("</40>")); 
    479479  drawCDKScroll(cdkContactPopup, true); 
    480480  winMain->RefreshWin(); 
  • trunk/console/src/window.cpp

    r4526 r6176  
    169169} 
    170170 
    171 void CWindow::wprintf(char *formatIn, ...) 
     171void CWindow::wprintf(const char *formatIn, ...) 
    172172{ 
    173173   va_list argp; 
  • trunk/console/src/window.h

    r4526 r6176  
    5757  CWindow& operator<<(unsigned long d); 
    5858  CWindow& operator<<(unsigned short d); 
    59   void wprintf(char *formatIn, ...); 
     59  void wprintf(const char *formatIn, ...); 
    6060  WINDOW *Win()  { return win; } 
    6161  CDKSCREEN *CDKScreen() { return cdkscreen; }