# HG changeset patch
# User Sebastien Jodogne <s.jodogne@gmail.com>
# Date 1537453080 -7200
# Node ID 9451431582e337f7845be69ee38a45e457bd0bc9
# Parent  7133ad478eead520cb7996acb79aa0f7b2127f8b# Parent  4993ced69d311f53d04510187552f4f78a3d661a
merge

diff -r 4993ced69d31 -r 9451431582e3 Core/DicomNetworking/RemoteModalityParameters.cpp
--- a/Core/DicomNetworking/RemoteModalityParameters.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/Core/DicomNetworking/RemoteModalityParameters.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -86,13 +86,13 @@
 
       SetPortNumber(static_cast<uint16_t>(tmp));
     }
-    catch (std::runtime_error /* error inside JsonCpp */)
+    catch (std::runtime_error& /* error inside JsonCpp */)
     {
       try
       {
         SetPortNumber(boost::lexical_cast<uint16_t>(portValue.asString()));
       }
-      catch (boost::bad_lexical_cast)
+      catch (boost::bad_lexical_cast&)
       {
         throw OrthancException(ErrorCode_BadFileFormat);
       }
diff -r 4993ced69d31 -r 9451431582e3 Core/FileStorage/FilesystemStorage.cpp
--- a/Core/FileStorage/FilesystemStorage.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/Core/FileStorage/FilesystemStorage.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -199,7 +199,7 @@
               }
             }
           }
-          catch (fs::filesystem_error)
+          catch (fs::filesystem_error&)
           {
           }
         }
diff -r 4993ced69d31 -r 9451431582e3 Core/HttpServer/MongooseServer.cpp
--- a/Core/HttpServer/MongooseServer.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/Core/HttpServer/MongooseServer.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -292,7 +292,7 @@
     {
       length = boost::lexical_cast<int>(cs->second);
     }
-    catch (boost::bad_lexical_cast)
+    catch (boost::bad_lexical_cast&)
     {
       return PostDataStatus_NoLength;
     }
@@ -364,7 +364,7 @@
       {
         fileSize = boost::lexical_cast<size_t>(fileSizeStr->second);
       }
-      catch (boost::bad_lexical_cast)
+      catch (boost::bad_lexical_cast&)
       {
         return PostDataStatus_Failure;
       }
@@ -417,7 +417,7 @@
         last = it;
       }
     }
-    catch (std::length_error)
+    catch (std::length_error&)
     {
       return PostDataStatus_Failure;
     }
diff -r 4993ced69d31 -r 9451431582e3 Core/Logging.cpp
--- a/Core/Logging.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/Core/Logging.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -496,7 +496,7 @@
              In this implementation, "threadid" is not printed.
           **/
 
-          char date[32];
+          char date[40];
           sprintf(date, "%c%02d%02d %02d:%02d:%02d.%06d ",
                   level[0],
                   now.date().month().as_number(),
diff -r 4993ced69d31 -r 9451431582e3 OrthancServer/OrthancInitialization.cpp
--- a/OrthancServer/OrthancInitialization.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/OrthancServer/OrthancInitialization.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -1053,7 +1053,7 @@
     {
       boost::filesystem::create_directories(indexDirectory);
     }
-    catch (boost::filesystem::filesystem_error)
+    catch (boost::filesystem::filesystem_error&)
     {
     }
 
diff -r 4993ced69d31 -r 9451431582e3 OrthancServer/OrthancRestApi/OrthancRestChanges.cpp
--- a/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -60,7 +60,7 @@
       since = boost::lexical_cast<int64_t>(call.GetArgument("since", "0"));
       limit = boost::lexical_cast<unsigned int>(call.GetArgument("limit", "0"));
     }
-    catch (boost::bad_lexical_cast)
+    catch (boost::bad_lexical_cast&)
     {
       return;
     }
diff -r 4993ced69d31 -r 9451431582e3 OrthancServer/OrthancRestApi/OrthancRestResources.cpp
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -476,7 +476,7 @@
     {
       frame = boost::lexical_cast<unsigned int>(frameId);
     }
-    catch (boost::bad_lexical_cast)
+    catch (boost::bad_lexical_cast&)
     {
       return;
     }
@@ -584,7 +584,7 @@
     {
       frame = boost::lexical_cast<unsigned int>(frameId);
     }
-    catch (boost::bad_lexical_cast)
+    catch (boost::bad_lexical_cast&)
     {
       return;
     }
@@ -618,7 +618,7 @@
     {
       frame = boost::lexical_cast<unsigned int>(frameId);
     }
-    catch (boost::bad_lexical_cast)
+    catch (boost::bad_lexical_cast&)
     {
       return;
     }
diff -r 4993ced69d31 -r 9451431582e3 Plugins/Engine/OrthancPlugins.cpp
--- a/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 20 14:22:07 2018 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 20 16:18:00 2018 +0200
@@ -393,7 +393,7 @@
 
     void SetServerContext(ServerContext* context)
     {
-      boost::mutex::scoped_lock(contextMutex_);
+      boost::mutex::scoped_lock lock(contextMutex_);
       context_ = context;
     }