bugmake - Bugs: bug #13550, Wrong type of variables in dir.c

 
 

bug #13550: Wrong type of variables in dir.c

Submitter:  Jerker Bäck <jerker_back>
Submitted:  Sun 26 Jun 2005 03:32:03 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  MS Windows
Fixed Release:  3.81 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 27 Jun 2005 01:00:33 PM UTC, comment #1: 

I made this change.

Paul D. Smith <psmith>
Group administrator
Sun 26 Jun 2005 03:32:03 PM UTC, original submission:  

resonse to warning
make\dir.c(518) : warning C4057: 'function' : 'LPDWORD' differs in indirection to slightly different base types from 'long *'

dir.c(418)
  long  fs_serno;
  long  fs_flags;
  long  fs_len;

used in call in to the Win32 library to retrieve file system and volume information:
BOOL GetVolumeInformation(
  LPCTSTR lpRootPathName,
  LPTSTR lpVolumeNameBuffer,
  DWORD nVolumeNameSize,
  LPDWORD lpVolumeSerialNumber,
  LPDWORD lpMaximumComponentLength,
  LPDWORD lpFileSystemFlags,
  LPTSTR lpFileSystemNameBuffer,
  DWORD nFileSystemNameSize
);

comment:
The implementation in make do not use these (uses it's own implementation flags) and the current Win32 defined maximum value of lpFileSystemFlags is 0x00080000, so this will not cause any errors. No harm in using the correct type though.

solution:
change type to:
  unsigned long  fs_serno = 0;  // lpVolumeSerialNumber
  unsigned long  fs_flags = 0;  // lpFileSystemFlags
  unsigned long  fs_len   = 0;  // lpFileSystemNameBuffer

regards Jerker

Jerker Bäck <jerker_back>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-04-01 psmith Fixed Release4.0 3.81
2005-06-27 psmith StatusNone Fixed
    Assigned toNone psmith
    Open/ClosedOpen Closed
    Fixed ReleaseNone 4.0

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code