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

[PATCH 4/7] x86/irq: Make create_irq() compile at -Og


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 19 Apr 2021 15:01:29 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 19 Apr 2021 14:02:00 +0000
  • Ironport-hdrordr: A9a23:JzmgOqEN8ZxqED95pLqFP5HXdLJzesId70hD6mlaTxtJfsuE0/ 2/hfhz726ItB89UGwt8OrhBICuWnXZnKQZ3aAwOvOYUBDiqC+UKuhZnO7f6hnBPwG7yeJHz6 dndMFFeaHNJHx3l9zz7gX9M/tI+qjlzImSie3Tz2hgQGhRAskKhTtRMQqVHlZ7QwNLH/MCZf ihz/BarDmtc2l/VKuGL0QFROTKqpnqk5/rcHc9ZiIP1QiUgTukrIP9ChiTty1xbxpzx94ZnV TtokjQ+rik98q20Abb0HXeq65LgcL7xsFYbfb87fQ9G3HJsEKFdY5hU7qNsHQUp+qo+RIQjN zBuVMEOcJrgkmhGF2dkF/I4U3A2Cxrw2L+wVWY6EGTxfDRdXYfMY59oq53NjHe8FEtudlg1r kj5RPhi7NeEQ7H2D7g7NzJSgxnmyOP0AEfuP9Wi2YaXZoVabdXo4Ba8k9THIwJAS72rIQqCv NnAs2Z/vBLalmXBkqpxFVH0ZipRDA+Dx2GSk8NtoiN2yNbm208y0cD3sQQkjMB+fsGOuF529 g=
  • Ironport-sdr: 2gZqkBYH1WeWqjKj9X9QFQDsCYxJLRAsGlWbdyIOlKNIXNu7DPePxXjniCpR4YIUoXnja2wAfv Jhskh1lGM37FwZPP+EUkGDJ7zy5VJMKFwwEneXji6w/KYrdnA+bhuCwYN6I4ZdGF9ddJLigRLJ +PH8GI+FMk8wv7u3MCCaA237dF9bJ2WCye1l3flV1Wnctzh7h/6MExASKBSqPTE7n9XxeZ2jxo t8+9AQZK8z4G+vpOo/8lhibZTPV0chl6qF9J3oz2K6Vi/+5cYHf66jBHaBexhSyRzYxDus12KK nsk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When compiling at -Og:

  irq.c: In function ‘create_irq’:
  irq.c:310:38: error: ‘desc’ may be used uninitialized in this 
function[-Werror=maybe-uninitialized]
               desc->arch.creator_domid = currd->domain_id;
               ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

This diagnostic is bogus, because desc is already read on earlier paths.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index a1693f92dd..72b86c6155 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -264,7 +264,7 @@ void __init clear_irq_vector(int irq)
 int create_irq(nodeid_t node, bool grant_access)
 {
     int irq, ret;
-    struct irq_desc *desc;
+    struct irq_desc *desc = NULL;
 
     for (irq = nr_irqs_gsi; irq < nr_irqs; irq++)
     {
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.