[hyena] build: enable warnings as errors



commit d7e10dd1778e53e33c44888cab5a5e4ea8d2c4eb
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Sat Aug 2 16:18:03 2014 +0200

    build: enable warnings as errors
    
    Like it used to happen in banshee (in the stable branch it still
    happens), let's enable warning as errors when ENABLE_RELEASE is
    false. This allows us to not fall behind with warnings by mistake,
    especially when we want to enable back warnings as errors again soon
    in banshee.
    
    For this, I fixed the remaining warnings resulting from the
    deprecation of Log.Exception().

 .../Hyena.Data.Sqlite/HyenaSqliteCommand.cs        |    2 +-
 .../Hyena.Data.Sqlite/SqliteModelProvider.cs       |    2 +-
 Hyena.Data.Sqlite/Hyena.Metrics/HttpPoster.cs      |    2 +-
 Hyena.Data.Sqlite/Hyena.Metrics/Metric.cs          |    4 ++--
 .../Hyena.Data.Gui/ListView/ListView_Accessible.cs |    2 +-
 Hyena.Gui/Hyena.Gui.Canvas/Rect.cs                 |    4 ++--
 Hyena.Gui/Hyena.Gui.Canvas/Size.cs                 |    4 ++--
 Hyena/Hyena.Downloader/HttpDownloader.cs           |    2 +-
 Hyena/Hyena.Downloader/HttpFileDownloader.cs       |    2 +-
 Hyena/Hyena.Downloader/HttpStringDownloader.cs     |    2 +-
 Hyena/Hyena.Jobs/SimpleAsyncJob.cs                 |    2 +-
 Hyena/Hyena/EventArgs.cs                           |    2 +-
 Hyena/Hyena/Log.cs                                 |    2 +-
 configure.ac                                       |    4 ++++
 14 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs 
b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
index aeac133..32acbdb 100644
--- a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
+++ b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
@@ -120,7 +120,7 @@ namespace Hyena.Data.Sqlite
                 }
             } catch (Exception e) {
                 Log.DebugFormat ("Exception executing command: {0}", command_text ?? command);
-                Log.Exception (e);
+                Log.Error (e);
                 execution_exception = e;
             }
 
diff --git a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteModelProvider.cs 
b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteModelProvider.cs
index e10ded5..6b3a64c 100644
--- a/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteModelProvider.cs
+++ b/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteModelProvider.cs
@@ -301,7 +301,7 @@ namespace Hyena.Data.Sqlite
                     key.SetValue (target, Insert (target));
                 }
             } catch (Exception e) {
-                Hyena.Log.Exception (e);
+                Log.Error (e);
                 Hyena.Log.DebugFormat ("type of key value: {0}", key.GetRawValue (target).GetType ());
                 throw;
             }
diff --git a/Hyena.Data.Sqlite/Hyena.Metrics/HttpPoster.cs b/Hyena.Data.Sqlite/Hyena.Metrics/HttpPoster.cs
index 4ab9112..38b5fd5 100644
--- a/Hyena.Data.Sqlite/Hyena.Metrics/HttpPoster.cs
+++ b/Hyena.Data.Sqlite/Hyena.Metrics/HttpPoster.cs
@@ -67,7 +67,7 @@ namespace Hyena.Metrics
                 }
                 return response.StatusCode == HttpStatusCode.OK;
             } catch (Exception e) {
-                Log.Exception ("Error posting metrics", e);
+                Log.Error ("Error posting metrics", e);
             }
 
             return false;
diff --git a/Hyena.Data.Sqlite/Hyena.Metrics/Metric.cs b/Hyena.Data.Sqlite/Hyena.Metrics/Metric.cs
index 773a5bd..1c3959e 100644
--- a/Hyena.Data.Sqlite/Hyena.Metrics/Metric.cs
+++ b/Hyena.Data.Sqlite/Hyena.Metrics/Metric.cs
@@ -63,7 +63,7 @@ namespace Hyena.Metrics
             try {
                 store.Add (new Sample (this, sampleValue));
             } catch (Exception e) {
-                Log.Exception ("Error taking sample", e);
+                Log.Error ("Error taking sample", e);
             }
         }
 
@@ -77,7 +77,7 @@ namespace Hyena.Metrics
             try {
                 store.Add (new Sample (this, sample_func ()));
             } catch (Exception e) {
-                Log.Exception ("Error taking sample", e);
+                Log.Error ("Error taking sample", e);
             }
         }
     }
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs 
b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
index 1aca99f..f8e2731 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Accessible.cs
@@ -175,7 +175,7 @@ namespace Hyena.Data.Gui
                     return ListViewAccessible<T>.GType;
                 };
             } catch (Exception ex) {
-                Log.Exception ("Initialization of accessibility support for ListView widgets failed", ex);
+                Log.Error ("Initialization of accessibility support for ListView widgets failed", ex);
             }
         }
     }
diff --git a/Hyena.Gui/Hyena.Gui.Canvas/Rect.cs b/Hyena.Gui/Hyena.Gui.Canvas/Rect.cs
index 3c60d3e..908e306 100644
--- a/Hyena.Gui/Hyena.Gui.Canvas/Rect.cs
+++ b/Hyena.Gui/Hyena.Gui.Canvas/Rect.cs
@@ -81,7 +81,7 @@ namespace Hyena.Gui.Canvas
             get { return w; }
             set {
                 if (value < 0) {
-                    Log.Exception (String.Format ("Width value to set: {0}", value),
+                    Log.Error (String.Format ("Width value to set: {0}", value),
                                    new ArgumentException ("Width setter should not receive negative values", 
"value"));
                     value = 0;
                 }
@@ -94,7 +94,7 @@ namespace Hyena.Gui.Canvas
             get { return h; }
             set {
                 if (value < 0) {
-                    Log.Exception (String.Format ("Height value to set: {0}", value),
+                    Log.Error (String.Format ("Height value to set: {0}", value),
                                    new ArgumentException ("Height setter should not receive negative 
values", "value"));
                     value = 0;
                 }
diff --git a/Hyena.Gui/Hyena.Gui.Canvas/Size.cs b/Hyena.Gui/Hyena.Gui.Canvas/Size.cs
index 542e926..66fc917 100644
--- a/Hyena.Gui/Hyena.Gui.Canvas/Size.cs
+++ b/Hyena.Gui/Hyena.Gui.Canvas/Size.cs
@@ -74,7 +74,7 @@ namespace Hyena.Gui.Canvas
             get { return height; }
             set {
                 if (value < 0) {
-                    Log.Exception (String.Format ("Height value to set: {0}", value),
+                    Log.Error (String.Format ("Height value to set: {0}", value),
                                    new ArgumentException ("Height setter should not receive negative 
values", "value"));
                     value = 0;
                 }
@@ -87,7 +87,7 @@ namespace Hyena.Gui.Canvas
             get { return width; }
             set {
                 if (value < 0) {
-                    Log.Exception (String.Format ("Width value to set: {0}", value),
+                    Log.Error (String.Format ("Width value to set: {0}", value),
                                    new ArgumentException ("Width setter should not receive negative values", 
"value"));
                     value = 0;
                 }
diff --git a/Hyena/Hyena.Downloader/HttpDownloader.cs b/Hyena/Hyena.Downloader/HttpDownloader.cs
index 26877db..e677006 100644
--- a/Hyena/Hyena.Downloader/HttpDownloader.cs
+++ b/Hyena/Hyena.Downloader/HttpDownloader.cs
@@ -274,7 +274,7 @@ namespace Hyena.Downloader
                 try {
                     handler (this);
                 } catch (Exception e) {
-                    Log.Exception (String.Format ("HttpDownloader.Finished handler ({0})", Uri), e);
+                    Log.Error (String.Format ("HttpDownloader.Finished handler ({0})", Uri), e);
                 }
             } 
 
diff --git a/Hyena/Hyena.Downloader/HttpFileDownloader.cs b/Hyena/Hyena.Downloader/HttpFileDownloader.cs
index f613b1a..9ed71d8 100644
--- a/Hyena/Hyena.Downloader/HttpFileDownloader.cs
+++ b/Hyena/Hyena.Downloader/HttpFileDownloader.cs
@@ -71,7 +71,7 @@ namespace Hyena.Downloader
                     file_stream = null;
                     OnFileFinished ();
                 } catch (Exception e) {
-                    Log.Exception (String.Format ("HttpFileDownloader.OnFinished ({0})", Uri), e);
+                    Log.Error (String.Format ("HttpFileDownloader.OnFinished ({0})", Uri), e);
                 }
             }
 
diff --git a/Hyena/Hyena.Downloader/HttpStringDownloader.cs b/Hyena/Hyena.Downloader/HttpStringDownloader.cs
index 412d977..fc022a4 100644
--- a/Hyena/Hyena.Downloader/HttpStringDownloader.cs
+++ b/Hyena/Hyena.Downloader/HttpStringDownloader.cs
@@ -62,7 +62,7 @@ namespace Hyena.Downloader
                 try {
                     handler (this);
                 } catch (Exception e) {
-                    Log.Exception (String.Format ("HttpStringDownloader.Finished handler ({0})", Uri), e);
+                    Log.Error (String.Format ("HttpStringDownloader.Finished handler ({0})", Uri), e);
                 }
             }
 
diff --git a/Hyena/Hyena.Jobs/SimpleAsyncJob.cs b/Hyena/Hyena.Jobs/SimpleAsyncJob.cs
index 0b0df75..0d7bb6c 100644
--- a/Hyena/Hyena.Jobs/SimpleAsyncJob.cs
+++ b/Hyena/Hyena.Jobs/SimpleAsyncJob.cs
@@ -70,7 +70,7 @@ namespace Hyena.Jobs
                 Run ();
             } catch (ThreadAbortException) {
             } catch (Exception e) {
-                Log.Exception (e);
+                Log.Error (e);
             }
         }
 
diff --git a/Hyena/Hyena/EventArgs.cs b/Hyena/Hyena/EventArgs.cs
index 7ac9ccc..90e7fb0 100644
--- a/Hyena/Hyena/EventArgs.cs
+++ b/Hyena/Hyena/EventArgs.cs
@@ -54,7 +54,7 @@ namespace Hyena
                     try {
                         handler.DynamicInvoke (args);
                     } catch (Exception e) {
-                        Log.Exception (e);
+                        Log.Error (e);
                     }
                 }
             }
diff --git a/Hyena/Hyena/Log.cs b/Hyena/Hyena/Log.cs
index 566116e..0503c07 100644
--- a/Hyena/Hyena/Log.cs
+++ b/Hyena/Hyena/Log.cs
@@ -418,7 +418,7 @@ namespace Hyena
         public static void DebugException (Exception e)
         {
             if (Debugging) {
-                Exception (e);
+                Exception (null, e, false);
             }
         }
 
diff --git a/configure.ac b/configure.ac
index 70b48f7..ca25de1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,11 @@ AC_ARG_ENABLE(release,
 AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
 if test "x$enable_release" = "xyes" ; then
        CONFIG_REQUESTED="yes"
+else
+       GMCS_FLAGS="-warnaserror"
 fi
+AC_SUBST(GMCS_FLAGS)
+
 AC_ARG_ENABLE(windows,
        AC_HELP_STRING([--enable-windows],
                [Use 'WINDOWS' Configuration [default=NO]]),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]