Changeset 21730 for branches/gcc-kmk/src


Ignore:
Timestamp:
Oct 21, 2011, 4:52:51 PM (14 years ago)
Author:
dmik
Message:

Common compiler warnings and errors.

Location:
branches/gcc-kmk/src/kernel32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/kernel32/HandleManager.cpp

    r21720 r21730  
    454454 *****************************************************************************/
    455455
    456 static ULONG INLINE _HMHandleQuery(HANDLE hHandle)
     456INLINE ULONG _HMHandleQuery(HANDLE hHandle)
    457457{
    458458    if (hHandle >= MAX_OS2_HMHANDLES)        /* check the table range */
     
    21332133 *           GetFileSizeEx   (KERNEL32.@)
    21342134 */
    2135 #define INVALID_FILE_SIZE        ((DWORD)~0UL)
    21362135BOOL WINAPI GetFileSizeEx( HANDLE hFile, PLARGE_INTEGER lpFileSize )
    21372136{
  • branches/gcc-kmk/src/kernel32/conprop.cpp

    r5308 r21730  
    7070  ULONG     ulID;                  // Resource ID for dialog page
    7171  PFNWP     wpDlgProc;             // dialog window procedure
    72   PSZ       szStatusLineText;      // Text to go on status line
    73   PSZ       szTabText;             // Text to go on major tab
     72  PCSZ      szStatusLineText;      // Text to go on status line
     73  PCSZ      szTabText;             // Text to go on major tab
    7474  ULONG     idFocus;               // ID of the control to get the focus first
    7575  BOOL      fParent;               // Is this a Parent page with minor pages
     
    9292/**********************************************************************/
    9393
    94 static VOID ErrorMsg( PSZ szFormat,
    95                      ... );
     94static VOID ErrorMsg(PCSZ szFormat,
     95                     ...);
    9696
    9797
     
    195195};
    196196
    197 static PSZ priorities[] = {"idle", "normal", "critical", "server"};
     197static PCSZ priorities[] = {"idle", "normal", "critical", "server"};
    198198#define NUMPRIORITIES 4
    199199
     
    216216#define MESSAGE_SIZE 1024
    217217
    218 static VOID ErrorMsg( PSZ szFormat,
    219                      ... )
     218static VOID ErrorMsg(PCSZ szFormat,
     219                     ...)
    220220{
    221221  PSZ     szMsg;
  • branches/gcc-kmk/src/kernel32/environ.cpp

    r21355 r21730  
    4141//list of important OS/2 environment variables that must not be removed
    4242//when creating a new process
    43 static char *lpReservedEnvStrings[] = {
     43static const char *lpReservedEnvStrings[] = {
    4444"HOSTNAME",
    4545"TZ",
     
    7676  //TEMP is a standard environment variable in Windows, but is not always
    7777  //present in OS/2, so make sure it is.
    78   if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 
     78  if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0)
    7979  {
    8080      if(GetEnvironmentVariableA("TMP", szVar, sizeof(szVar)) == 0) {
     
    226226 *             If the function fails, the return value is zero
    227227 * Remark    :
    228  * Status    : 
     228 * Status    :
    229229 *
    230230 *****************************************************************************/
     
    254254            if ((p = strchr( src + 1, '%' )) != NULL)
    255255            {
    256                 len = p - src - 1;  /* Length of the variable name */   
     256                len = p - src - 1;  /* Length of the variable name */
    257257                if ((var = ENV_FindVariable( GetEnvironmentStringsA(),
    258258                                             src + 1, len )) != NULL)
     
    309309 *             If the function fails, the return value is zero
    310310 * Remark    :
    311  * Status    : 
     311 * Status    :
    312312 *
    313313 *****************************************************************************/
     
    340340    char *tmpenvnew, *newenv;
    341341    int newsize = 0, len;
    342        
     342
    343343    dprintf(("New environment:"));
    344344    while(*tmpenvold) {
     
    374374        tmpenvold += len+1;
    375375    }
     376    int i;
    376377    for(i=0;i<sizeof(lpReservedEnvStrings)/sizeof(char *);i++) {
    377378        if(!ENV_FindVariable(lpEnvironment, lpReservedEnvStrings[i], strlen(lpReservedEnvStrings[i]))) {
  • branches/gcc-kmk/src/kernel32/hmcomm.cpp

    r21302 r21730  
    233233        {
    234234            OSLibDosClose(pHMHandleData->hHMHandle);
    235             delete pHMHandleData->lpHandlerData;
     235            delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData;
    236236            return rc;
    237237        }
     
    274274fail:
    275275
    276     delete pHMHandleData->lpHandlerData;
     276    delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData;
    277277    OSLibDosClose(pHMHandleData->hHMHandle);
    278278    return ret;
     
    300300BOOL HMDeviceCommClass::CloseHandle(PHMHANDLEDATA pHMHandleData)
    301301{
    302     PHMDEVCOMDATA pDevData = (PHMDEVCOMDATA)pHMHandleData->lpHandlerData;
    303302    dprintf(("HMComm: Serial communication port close request"));
    304303
    305     delete pHMHandleData->lpHandlerData;
     304    delete (PHMDEVCOMDATA)pHMHandleData->lpHandlerData;
    306305    return OSLibDosClose(pHMHandleData->hHMHandle);
    307306}
  • branches/gcc-kmk/src/kernel32/wprocess.cpp

    r21720 r21730  
    299299    StartupInfo.cbReserved2     = NULL;
    300300    if (!StartupInfo.lpDesktop)
    301         StartupInfo.lpDesktop  = "Desktop";
     301        StartupInfo.lpDesktop  = (LPSTR)"Desktop";
    302302    if (!StartupInfo.lpTitle)
    303         StartupInfo.lpTitle    = "Title";
     303        StartupInfo.lpTitle    = (LPSTR)"Title";
    304304    ProcessENVDB.hStdin  = StartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
    305305    ProcessENVDB.hStdout = StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
     
    29872987
    29882988    lpmodinfo->SizeOfImage = winmod->getImageSize();
    2989     lpmodinfo->EntryPoint  = winmod->getEntryPoint();
     2989    lpmodinfo->EntryPoint  = (LPVOID)winmod->getEntryPoint();
    29902990    lpmodinfo->lpBaseOfDll = (void*)hModule;
    29912991
Note: See TracChangeset for help on using the changeset viewer.