Ignore:
Timestamp:
Oct 24, 2011, 9:23:36 PM (14 years ago)
Author:
dmik
Message:

Common compiler warnings and errors.

File:
1 edited

Legend:

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

    r21716 r21737  
    3737#define MAX_RES 17
    3838typedef struct {
    39   char *typename;
    40   int   namelen;
     39  const char *typenam;
     40  int namelen;
    4141} STD_RESTYPE;
    4242
     
    131131    typelen = strlen(lpszType);
    132132
    133         for(int i=0;i<MAX_RES;i++) {
     133        int i;
     134        for(i=0;i<MAX_RES;i++) {
    134135            if(ResType[i].namelen &&
    135136               ResType[i].namelen == typelen &&
    136                stricmp(lpszType, ResType[i].typename) == 0)
     137               stricmp(lpszType, ResType[i].typenam) == 0)
    137138                    break;
    138139        }
     
    186187    typelen = strlen(astring1);
    187188
    188         for(int i=0;i<MAX_RES;i++) {
     189        int i;
     190        for(i=0;i<MAX_RES;i++) {
    189191            if(ResType[i].namelen &&
    190192               ResType[i].namelen == typelen &&
    191                stricmp(astring1, ResType[i].typename) == 0)
     193               stricmp(astring1, ResType[i].typenam) == 0)
    192194                    break;
    193195        }
     
    603605            pstring = (PIMAGE_RESOURCE_DIR_STRING_U)((ULONG)pResRootDir + nameOffset);
    604606            int len = lstrlenWtoA( pstring->NameString, pstring->Length );
    605             char *typename = (char *)malloc( len + 1 );
    606             lstrcpynWtoA(typename, pstring->NameString, len + 1 );
    607             typename[len] = 0;
    608 
    609         fRet = lpEnumFunc(hmod, typename, lParam);
    610             free(typename);
     607            char *typenam = (char *)malloc( len + 1 );
     608            lstrcpynWtoA(typenam, pstring->NameString, len + 1 );
     609            typenam[len] = 0;
     610
     611        fRet = lpEnumFunc(hmod, typenam, lParam);
     612            free(typenam);
    611613        }
    612614        else {
Note: See TracChangeset for help on using the changeset viewer.