e4e640
commit cbf3b6e6ac7d26d6667b306b9d8677678624bec8
e4e640
Author: Frank Ch. Eigler <fche@redhat.com>
e4e640
Date:   Thu Nov 15 22:02:18 2018 -0500
e4e640
e4e640
    bpf-translate.cxx: quiet a compiler warning
e4e640
    
e4e640
    It's a false positive with rawhide gcc, but easy to quiet anyway.
e4e640
e4e640
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
e4e640
index b382a2e..78a5a8d 100644
e4e640
--- a/bpf-translate.cxx
e4e640
+++ b/bpf-translate.cxx
e4e640
@@ -1150,6 +1150,7 @@ bpf_unparser::emit_asm_opcode (const asm_stmt &stmt,
e4e640
                                 stmt.fallthrough.c_str()), stmt.tok);
e4e640
       block *target = label_map[stmt.jmp_target];
e4e640
       block *fallthrough = label_map[stmt.fallthrough];
e4e640
+      c = EQ; // defeat compiler warning about uninitialized c
e4e640
       this_prog.mk_jcond(this_ins, c, v_dest, v_src1, target, fallthrough);
e4e640
     }
e4e640
   else // regular opcode
e4e640
e4e640
commit e6227e5df0851bea0e5a94b17fe0a82c280ed600
e4e640
Author: Serhei Makarov <smakarov@redhat.com>
e4e640
Date:   Fri Nov 16 12:12:07 2018 -0500
e4e640
e4e640
    bpf-translate.cxx: don't clobber any earlier value of c
e4e640
e4e640
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
e4e640
index 78a5a8d..92f0ea4 100644
e4e640
--- a/bpf-translate.cxx
e4e640
+++ b/bpf-translate.cxx
e4e640
@@ -1027,7 +1027,8 @@ bpf_unparser::emit_asm_opcode (const asm_stmt &stmt,
e4e640
     throw SEMANTIC_ERROR (_("invalid bpf code"), stmt.tok);
e4e640
 
e4e640
   bool r_dest = false, r_src0 = false, r_src1 = false, i_src1 = false;
e4e640
-  bool op_jmp = false, op_jcond = false; condition c;
e4e640
+  bool op_jmp = false, op_jcond = false;
e4e640
+  condition c = EQ; // <- quiet a compiler warning about uninitialized c
e4e640
   switch (BPF_CLASS (stmt.code))
e4e640
     {
e4e640
     case BPF_LDX:
e4e640
@@ -1150,7 +1151,6 @@ bpf_unparser::emit_asm_opcode (const asm_stmt &stmt,
e4e640
                                 stmt.fallthrough.c_str()), stmt.tok);
e4e640
       block *target = label_map[stmt.jmp_target];
e4e640
       block *fallthrough = label_map[stmt.fallthrough];
e4e640
-      c = EQ; // defeat compiler warning about uninitialized c
e4e640
       this_prog.mk_jcond(this_ins, c, v_dest, v_src1, target, fallthrough);
e4e640
     }
e4e640
   else // regular opcode