[syslinux] [PATCH 3/5] installers: MSVC compatibility fixes

Gene Cumm gene.cumm at gmail.com
Wed Mar 9 03:51:11 PST 2016


On Mon, Mar 7, 2016 at 7:03 AM, Gene Cumm <gene.cumm at gmail.com> wrote:
> On Sun, Mar 6, 2016 at 8:21 PM, Shao Miller via Syslinux
> <syslinux at zytor.com> wrote:
>> On 3/6/2016 17:03, Pete Batard via Syslinux wrote:
>>>
>>> The problem was due to the following warning when compiling for 64-bit
>>> using using the latest WDK (7600.16385.1), with warning level 3 (/W3):
>>>
>>> 1>c:\rufus\src\syslinux\libinstaller\syslxmod.c(44) : warning C4242: '=' :
>>> conversion from 'sector_t' to 'unsigned int', possible loss of data
>>
>>
>> Then your patch seems like the most sensible solution, as this warning
>> identifies that the two objects have different types.  That declaration
>> context wasn't included in the patch; too far up. :)
>
> Add to this that you need to hunt other source files to find that the
> first is signed.
>
> I'd say this changeset needs to be split.  The first is about packing
> compatibility.
>
>
> libinstaller: PACKED compatibility for MSVC
>
> MSVC requires prefix and suffix attributes for packing structures.
>
>
> while the second is all about casting:
>
>
> libinstaller: remove signed to unsigned cast in initialization

Split as noted and merged.

-- 
-Gene


More information about the Syslinux mailing list