emacs-diffs
[Top][All Lists]
Advanced

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

master bc95100: Avoid a compilation warning about an ambiguous else


From: Lars Ingebrigtsen
Subject: master bc95100: Avoid a compilation warning about an ambiguous else
Date: Thu, 19 Nov 2020 18:19:27 -0500 (EST)

branch: master
commit bc951000b35fc48edfe1f643998d201b971f0d30
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Avoid a compilation warning about an ambiguous else
    
    * src/data.c (set_internal): Avoid compilation warning.
    
    data.c:1443:9: error: suggest explicit braces to avoid ambiguous ‘else’
     1443 |      if (idx > 0 && bindflag == SET_INTERNAL_SET
          |         ^
---
 src/data.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/data.c b/src/data.c
index 5d4df18..384c259 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1442,10 +1442,12 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, 
Lisp_Object where,
            int idx = PER_BUFFER_IDX (offset);
            if (idx > 0 && bindflag == SET_INTERNAL_SET
                && !PER_BUFFER_VALUE_P (buf, idx))
-             if (let_shadows_buffer_binding_p (sym))
-               set_default_internal (symbol, newval, bindflag);
-             else
-               SET_PER_BUFFER_VALUE_P (buf, idx, 1);
+             {
+               if (let_shadows_buffer_binding_p (sym))
+                 set_default_internal (symbol, newval, bindflag);
+               else
+                 SET_PER_BUFFER_VALUE_P (buf, idx, 1);
+             }
          }
 
        if (voide)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]