Message ID | 20231127043703.49489-1-faithilikerun@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Add full zoned storage emulation to qcow2 driver | expand |
Clang reports ../block/qcow2.c:4066:5: error: mutex 'graph_lock' is not held on every path through here [-Werror,-Wthread-safety-analysis] blk_co_unref(blk); ^ ../block/qcow2.c:3928:5: note: mutex acquired here bdrv_graph_co_rdlock(); ^ ../block/qcow2.c:4066:5: error: mutex 'graph_lock' is not held on every path through here [-Werror,-Wthread-safety-analysis] blk_co_unref(blk); ^ ../block/qcow2.c:3928:5: note: mutex acquired here bdrv_graph_co_rdlock(); ^ 2 errors generated.
Markus Armbruster <armbru@redhat.com> 于2023年11月30日周四 09:25写道: > > Clang reports > > ../block/qcow2.c:4066:5: error: mutex 'graph_lock' is not held on every path through here [-Werror,-Wthread-safety-analysis] > blk_co_unref(blk); > ^ > ../block/qcow2.c:3928:5: note: mutex acquired here > bdrv_graph_co_rdlock(); > ^ > ../block/qcow2.c:4066:5: error: mutex 'graph_lock' is not held on every path through here [-Werror,-Wthread-safety-analysis] > blk_co_unref(blk); > ^ > ../block/qcow2.c:3928:5: note: mutex acquired here > bdrv_graph_co_rdlock(); > ^ > 2 errors generated. > Turns out that my gcc 12.0 does not support -Wthread-safety-analysis flag. Need to use --cc=clang to reproduce it. Thanks! Sam