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

Pete Batard pete at akeo.ie
Sun Mar 6 14:03:42 PST 2016


Hi Shao,

You're right, "a=b=<immediate value>;" wasn't the actual issue.

On 2016.03.06 20:34, Shao Miller via Syslinux wrote:
> If this change is simply due to a mental note about an incident where a
> compiler once complained about this type of thing

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

I used to compile Rufus with /W3 everywhere when using WDK, but I have 
very recently reduced the warning level to /W2 for the Syslinux part 
(see [1]) , so that I could align with your source without having to 
also apply a bunch of extra patches due to WDK compilation breakage 
without additional casts (e.g. [2], [3], bearing in mind that this is a 
commit that removes those casts). I remember that you guys weren't too 
receptive about adding those casts to the source, when I proposed them 4 
years ago [4]...

With /W2, you are correct that WDK doesn't complain about this specific 
line any more, so I can live with this part not being applied. That is, 
unless you also want to consider people who may be compiling part of the 
Syslinux source using WDK with /W3 (which I wouldn't mind being able to 
reinstate for Rufus compilation, but in that case, Syslinux would also 
need these additional cast patches).

Regards,

/Pete

[1] 
https://github.com/pbatard/rufus/commit/db0880e534e4e9504e8c283256fbfbd0683abded#diff-729493b04f2117d4290873c20e986726
[2] 
https://github.com/pbatard/rufus/commit/db0880e534e4e9504e8c283256fbfbd0683abded#diff-9b695506cac9f006f20d03d23ee289e0
[3] 
https://github.com/pbatard/rufus/commit/db0880e534e4e9504e8c283256fbfbd0683abded#diff-55f6a1a381f24361820e0047aec04222
[4] http://www.syslinux.org/archives/2012-February/017643.html


More information about the Syslinux mailing list