changeset 2836:7133ad478eea

fix Debian warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 Sep 2018 16:17:46 +0200
parents b51233f03e7e
children 9451431582e3
files Core/DicomNetworking/RemoteModalityParameters.cpp Core/FileStorage/FilesystemStorage.cpp Core/HttpServer/MongooseServer.cpp Core/Logging.cpp OrthancServer/OrthancInitialization.cpp OrthancServer/OrthancRestApi/OrthancRestChanges.cpp OrthancServer/OrthancRestApi/OrthancRestResources.cpp Plugins/Engine/OrthancPlugins.cpp
diffstat 8 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomNetworking/RemoteModalityParameters.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/Core/DicomNetworking/RemoteModalityParameters.cpp	Thu Sep 20 16:17:46 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);
       }
--- a/Core/FileStorage/FilesystemStorage.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/Core/FileStorage/FilesystemStorage.cpp	Thu Sep 20 16:17:46 2018 +0200
@@ -199,7 +199,7 @@
               }
             }
           }
-          catch (fs::filesystem_error)
+          catch (fs::filesystem_error&)
           {
           }
         }
--- a/Core/HttpServer/MongooseServer.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/Core/HttpServer/MongooseServer.cpp	Thu Sep 20 16:17:46 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;
     }
--- a/Core/Logging.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/Core/Logging.cpp	Thu Sep 20 16:17:46 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(),
--- a/OrthancServer/OrthancInitialization.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/OrthancServer/OrthancInitialization.cpp	Thu Sep 20 16:17:46 2018 +0200
@@ -1053,7 +1053,7 @@
     {
       boost::filesystem::create_directories(indexDirectory);
     }
-    catch (boost::filesystem::filesystem_error)
+    catch (boost::filesystem::filesystem_error&)
     {
     }
 
--- a/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestChanges.cpp	Thu Sep 20 16:17:46 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;
     }
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Sep 20 16:17:46 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;
     }
--- a/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 20 11:27:48 2018 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 20 16:17:46 2018 +0200
@@ -393,7 +393,7 @@
 
     void SetServerContext(ServerContext* context)
     {
-      boost::mutex::scoped_lock(contextMutex_);
+      boost::mutex::scoped_lock lock(contextMutex_);
       context_ = context;
     }