[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 6/8] Fix some coroutine_fn indirect calls and pointer assignments
From: |
Alberto Faria |
Subject: |
[RFC 6/8] Fix some coroutine_fn indirect calls and pointer assignments |
Date: |
Sat, 2 Jul 2022 12:33:29 +0100 |
These problems were found by static-analyzer.py. Only a few of the
reported cases were fixed.
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
include/block/block_int-common.h | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index 8947abab76..16c45d1262 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -731,13 +731,11 @@ struct BlockDriver {
void coroutine_fn (*bdrv_co_drain_end)(BlockDriverState *bs);
bool (*bdrv_supports_persistent_dirty_bitmap)(BlockDriverState *bs);
- bool (*bdrv_co_can_store_new_dirty_bitmap)(BlockDriverState *bs,
- const char *name,
- uint32_t granularity,
- Error **errp);
- int (*bdrv_co_remove_persistent_dirty_bitmap)(BlockDriverState *bs,
- const char *name,
- Error **errp);
+ bool coroutine_fn (*bdrv_co_can_store_new_dirty_bitmap)(
+ BlockDriverState *bs, const char *name, uint32_t granularity,
+ Error **errp);
+ int coroutine_fn (*bdrv_co_remove_persistent_dirty_bitmap)(
+ BlockDriverState *bs, const char *name, Error **errp);
};
static inline bool block_driver_can_compress(BlockDriver *drv)
--
2.36.1
- [RFC 0/8] Introduce an extensible static analyzer, Alberto Faria, 2022/07/02
- [RFC 1/8] Add an extensible static analyzer, Alberto Faria, 2022/07/02
- [RFC 2/8] Drop some unused static function return values, Alberto Faria, 2022/07/02
- [RFC 3/8] static-analyzer: Enforce coroutine_fn restrictions for direct calls, Alberto Faria, 2022/07/02
- [RFC 4/8] Fix some direct calls from non-coroutine_fn to coroutine_fn, Alberto Faria, 2022/07/02
- [RFC 6/8] Fix some coroutine_fn indirect calls and pointer assignments,
Alberto Faria <=
- [RFC 5/8] static-analyzer: Enforce coroutine_fn restrictions on function pointers, Alberto Faria, 2022/07/02
[RFC 7/8] block: Add no_coroutine_fn marker, Alberto Faria, 2022/07/02
[RFC 8/8] Avoid calls from coroutine_fn to no_coroutine_fn, Alberto Faria, 2022/07/02
Re: [RFC 0/8] Introduce an extensible static analyzer, Paolo Bonzini, 2022/07/02
Re: [RFC 0/8] Introduce an extensible static analyzer, Daniel P . Berrangé, 2022/07/04