[gnome-builder/alatiera/ifdef] ide-session.c: use #ifdef instead of #if for IDE_ENABLE_TRACE




commit 58d1d563ea2109d726db1ccec5613e62b32a0183
Author: Jordan Petridis <jordan centricular com>
Date:   Fri Jul 9 09:57:12 2021 +0300

    ide-session.c: use #ifdef instead of #if for IDE_ENABLE_TRACE
    
    Use #ifdef instead of #if so the compiler doesn't complain
    when its undefined.
    
    ```
    ../src/libide/gui/ide-session.c: In function ‘save_state_to_disk’:
    ../src/libide/gui/ide-session.c:684:5: error: "IDE_ENABLE_TRACE" is not defined, evaluates to 0 
[-Werror=undef]
      684 | #if IDE_ENABLE_TRACE
          |     ^~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    ```
    
    followup of e73f44a34c0af310575fce92ea26e310fa640788

 src/libide/gui/ide-session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-session.c b/src/libide/gui/ide-session.c
index 8181ee982..6267f3f0b 100644
--- a/src/libide/gui/ide-session.c
+++ b/src/libide/gui/ide-session.c
@@ -681,7 +681,7 @@ save_state_to_disk (IdeSession      *self,
   state = g_variant_ref_sink (g_variant_dict_end (&final_dict));
   bytes = g_variant_get_data_as_bytes (state);
 
-#if IDE_ENABLE_TRACE
+#ifdef IDE_ENABLE_TRACE
   {
     g_autofree char *str = g_variant_print (state, TRUE);
     IDE_TRACE_MSG ("Saving session state to %s", str);


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