summary refs log tree commit diff stats
path: root/results/scraper/launchpad-without-comments/1651167
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-30 12:24:58 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-06-30 12:27:06 +0000
commit33606b41d35115f887ea688b1a16f2ff85bf2fe4 (patch)
tree406b2c7b19a087ba437c68f3dbf0b589fa1d6150 /results/scraper/launchpad-without-comments/1651167
parentadedf8771bc4de3113041ca21bd4d0d1c0014b6a (diff)
downloademulator-bug-study-33606b41d35115f887ea688b1a16f2ff85bf2fe4.tar.gz
emulator-bug-study-33606b41d35115f887ea688b1a16f2ff85bf2fe4.zip
add launchpad bug reports without comments
Diffstat (limited to 'results/scraper/launchpad-without-comments/1651167')
-rw-r--r--results/scraper/launchpad-without-comments/165116726
1 files changed, 26 insertions, 0 deletions
diff --git a/results/scraper/launchpad-without-comments/1651167 b/results/scraper/launchpad-without-comments/1651167
new file mode 100644
index 00000000..3b7d9f92
--- /dev/null
+++ b/results/scraper/launchpad-without-comments/1651167
@@ -0,0 +1,26 @@
+hw/ipmi/isa_ipmi_bt.c:283: suspect use of macro ?
+
+I just had a go at compiling qemu trunk with
+llvm trunk. It said:
+
+hw/ipmi/isa_ipmi_bt.c:283:31: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
+
+Source code is
+
+           IPMI_BT_SET_HBUSY(ib->control_reg,
+                              !IPMI_BT_GET_HBUSY(ib->control_reg));
+
+That use of ! causes trouble. The SET and GET
+macros are defined as:
+
+#define IPMI_BT_GET_HBUSY(d)       (((d) >> IPMI_BT_HBUSY_BIT) & 0x1)
+#define IPMI_BT_SET_HBUSY(d, v)    (d) = (((d) & ~IPMI_BT_HBUSY_MASK) | \
+                                       (((v & 1) << IPMI_BT_HBUSY_BIT)))
+
+I can make the compiler shut up by adding extra () in the last
+use of v in the SET macro, like this:
+
+#define IPMI_BT_SET_HBUSY(d, v)    (d) = (((d) & ~IPMI_BT_HBUSY_MASK) | \
+                                       ((((v) & 1) << IPMI_BT_HBUSY_BIT)))
+
+I think this is standard good practice when using macro parameters anyway.
\ No newline at end of file