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

 
 

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

Submitted by:  Jerker Bäck <jerker_back>
Submitted on:  Sun 26 Jun 2005 03:32:03 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: MS Windows
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

I made this change.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:16:43 AM UTCpsmithFixed Release4.0=>3.81
Mon 27 Jun 2005 01:00:33 PM UTCpsmithStatusNone=>Fixed
  Assigned toNone=>psmith
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0

Back to the top


Powered by Savane 3.1-cleanup1