< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Compilation warnings on windows


Hello!

Visual Studio 7.1 generates warnings about possible loss of data due 
to conversion from size_t to int when LogInfo or LogErr are being 
compiled. The following patch fixes the warnings, but probably the 
better approach could be in fixing Data constructors to use size_t 
instead of int. Please, apply.


Index: Logger.hxx
===================================================================
--- Logger.hxx  (revision 5202)
+++ Logger.hxx  (working copy)
@@ -75,7 +75,7 @@
       {                                                                        
                 \
          const resip::Data _resip_rest(resip::Data::Share,                     
                 \
                                       _resip_result.data() + 
_resip_headerLength,               \
-                                      _resip_result.size() - 
_resip_headerLength);              \
+                                      (int)(_resip_result.size() - 
_resip_headerLength));       \
          if (!(*resip::Log::getExternal())(level_, system_, 
resip::Log::getAppName(),           \
                                            __FILE__, __LINE__, _resip_rest))   
                 \
          {                                                                     
                 \

-- 
...Bye..Dmitry.