comparison host/tools/Utils/common/Subprocess.cpp @ 3283:355bcd2cec54

* common/Subprocess.cpp: Silence signed/unsigned compiler warning with recent GCC. [ Bugzilla 1001955 ]
author jld
date Thu, 13 Mar 2014 15:31:34 +0000
parents 74dbf4c3f2e1
children
comparison
equal deleted inserted replaced
3282:b340d0ab5dd3 3283:355bcd2cec54
1 // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### 1 // ####ECOSHOSTGPLCOPYRIGHTBEGIN####
2 // ------------------------------------------- 2 // -------------------------------------------
3 // This file is part of the eCos host tools. 3 // This file is part of the eCos host tools.
4 // Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. 4 // Copyright (C) 1998, 1999, 2000, 2004, 2014 Free Software Foundation, Inc.
5 // 5 //
6 // This program is free software; you can redistribute it and/or modify 6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by 7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 or (at your option) any 8 // the Free Software Foundation; either version 2 or (at your option) any
9 // later version. 9 // later version.
636 arPids=new DWORD[dwMaxPids]; 636 arPids=new DWORD[dwMaxPids];
637 } while(lpfEnumProcesses(arPids, dwMaxPids, &dwPidSize) && dwPidSize/sizeof(DWORD)==dwMaxPids) ; 637 } while(lpfEnumProcesses(arPids, dwMaxPids, &dwPidSize) && dwPidSize/sizeof(DWORD)==dwMaxPids) ;
638 638
639 if(dwPidSize/sizeof(DWORD)<dwMaxPids){ 639 if(dwPidSize/sizeof(DWORD)<dwMaxPids){
640 rc=true; 640 rc=true;
641 for( DWORD dwIndex = 0 ; (signed)dwIndex < dwPidSize/sizeof(DWORD); dwIndex++ ) { 641 for( DWORD dwIndex = 0 ; dwIndex < dwPidSize/sizeof(DWORD); dwIndex++ ) {
642 // Regardless of OpenProcess success or failure, we 642 // Regardless of OpenProcess success or failure, we
643 // still call the enum func with the ProcID. 643 // still call the enum func with the ProcID.
644 DWORD pid=arPids[dwIndex]; 644 DWORD pid=arPids[dwIndex];
645 HANDLE hProcess=::OpenProcess( PROCESS_QUERY_INFORMATION, FALSE, pid ); 645 HANDLE hProcess=::OpenProcess( PROCESS_QUERY_INFORMATION, FALSE, pid );
646 if (hProcess ) { 646 if (hProcess ) {