Dear Brad,
thanks for your advice. An accoring patch is attached.

> 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).

There is a comparison to "count", which triggered another warning. I
have fixed that one, too.

Bye
Christoph
>From 42c934571ed0b04ec45ee58c3179aee78b3368f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <[email protected]>
Date: Wed, 3 Feb 2016 23:22:38 +0100
Subject: [PATCH] Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity
 unsigned ints

---
 Source/cmComputeLinkDepends.cxx | 2 +-
 Source/cmGeneratorTarget.h      | 2 +-
 Source/cmLinkItem.h             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 13098ad..2796fdf 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -931,7 +931,7 @@ cmComputeLinkDepends::MakePendingComponent(unsigned int component)
 //----------------------------------------------------------------------------
 int cmComputeLinkDepends::ComputeComponentCount(NodeList const& nl)
 {
-  int count = 2;
+  unsigned int count = 2;
   for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
     {
     if(cmGeneratorTarget const* target = this->EntryList[*ni].Target)
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index d96a32c..65c29f5 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -599,7 +599,7 @@ private:
   {
     ImportInfo(): NoSOName(false), Multiplicity(0) {}
     bool NoSOName;
-    int Multiplicity;
+    unsigned int Multiplicity;
     std::string Location;
     std::string SOName;
     std::string ImportLibrary;
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index b603bcc..561293e 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -73,7 +73,7 @@ struct cmLinkInterface: public cmLinkInterfaceLibraries
 
   // Number of repetitions of a strongly connected component of two
   // or more static libraries.
-  int Multiplicity;
+  unsigned int Multiplicity;
 
   // Libraries listed for other configurations.
   // Needed only for OLD behavior of CMP0003.
-- 
2.6.2

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to