[cmake-developers] Patch: Remove superfluous semicolon after method

Brad King brad.king at kitware.com
Mon Feb 1 10:51:08 EST 2016


On 01/29/2016 05:43 PM, Christoph Grüninger wrote:
> please find attached a minimal patch to fix a GCC 6 pedantic warning
> concerning a superfluous semicolon after a method.

Applied, thanks:

 cmAlgorithms.h: remove superfluous semicolon after method
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccb2d5c0

> Additional I got the following warning:
>> CMake/Source/cmGeneratorTarget.cxx:4835:52: warning: format ‘%u’ expects
>> argument of type ‘unsigned int*’, but argument 3 has type ‘int*’ [-Wformat=]
>>        sscanf(config_reps, "%u", &iface.Multiplicity);
> 
> Same on 4840:45, 5543:51, 5548:44 in the same file. It is not obvious to
> me whether you want to change the types in cmOptionalLinkInterface,
> change the type in sscanf or cast the types.

There is no reason to have negative values for that, so please update
both cmLinkInterface::Multiplicity and cmGeneratorTarget::Multiplicity
to use `unsigned int` and follow through with any further changes
needed for that (I don't think there are any but have not checked).

Thanks,
-Brad



More information about the cmake-developers mailing list