Avoid a warning in bpf_module.cc
authorBrenden Blanco <bblanco@plumgrid.com>
Mon, 2 May 2016 04:26:04 +0000 (21:26 -0700)
committerBrenden Blanco <bblanco@plumgrid.com>
Mon, 2 May 2016 04:26:04 +0000 (21:26 -0700)
The variable inside the if statement was unused, unliked the blocks
above and below it. Use the isa<> check instead.

src/cc/bpf_module.cc

index cc5aae1..72dad26 100644 (file)
@@ -156,7 +156,7 @@ static void parse_type(IRBuilder<> &B, vector<Value *> *args, string *fmt,
       *fmt += " ";
     }
     *fmt += "]";
-  } else if (PointerType *pt = dyn_cast<PointerType>(type)) {
+  } else if (isa<PointerType>(type)) {
     *fmt += "0xl";
     if (is_writer)
       *fmt += "x";