qom/object: Remove circular include dependency
PATCH 1/1 qom/object: Remove circular include dependency
From: Philippe Mathieu-Daudé <[email protected]>
"qom/object.h" doesn't need to include itself.
--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)
include/qom/object.h +0 -1
@@ -16,7 +16,6 @@#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;
Signature · 1 line
2.35.1
Quoted 5 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <[email protected]>
"
qom/object.h" doesn't need to include itself.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 16 lines
--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)include/qom/object.h +0
-1@@ -16,7 +16,6 @@#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;
Quoted 15 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <[email protected]>
"
qom/object.h" doesn't need to include itself.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)include/qom/object.h +0
-0
include/qom/object.h line 21
Quoted 7 lines
include/qom/object.h +0
-1@@ -16,7 +16,6 @@#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;
Accidentally (but harmlessly) added in commit db1015e92e0483 by a change generated by a script.
Eduardo: is it worth making ./scripts/codeconverter/converter.py handle this as a special case, so it doesn't add the include line to qom/object.h itself ? Or do we not really expect that script to be run on the codebase again in future ?
thanks
-- PMM
Quoted 18 lines · Peter Maydell
Quoted 16 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <[email protected]>
"
qom/object.h" doesn't need to include itself.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)include/qom/object.h +0
-0@@ -16,7 +16,6 @@
Quoted 8 lines
include/qom/object.h line 21
Quoted 6 lines
include/qom/object.h +0
-1#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;Accidentally (but harmlessly)
This makes crash clang tools such clang-format, I'll amend that to the description.
Quoted 9 lines
added in commit
db1015e92e0483by a
change generated by a script.Reviewed-by Peter Maydell <[email protected]>Eduardo: is it worth making
./scripts/codeconverter/converter.pyhandle this as a special case, so it doesn't add the include line toqom/object.hitself ? Or do we not really expect that script to be run on the codebase again in future ?
Oh, I see required_identifiers() adding this include in scripts/codeconverter/codeconverter/qom_macros.py.
If we do not expect to use these scripts, we should remove it from the repository. They are in good shape however, and might be still valuable, so I'll amend a fix to the script.
Thanks for pointing at these scripts,
Phil.
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 1 line · Peter Maydell
Accidentally (but harmlessly)
This makes crash clang tools such clang-format, I'll amend that to the description.
That sounds like a bug in clang-format :-)
-- PMM
Quoted 14 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <[email protected]>
"
qom/object.h" doesn't need to include itself.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)include/qom/object.h +0
-0
include/qom/object.h line 21
Quoted 7 lines
include/qom/object.h +0
-1@@ -16,7 +16,6 @@#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;
I figure this is scripts/codeconverter/converter.py's doing, in commit db1015e92e "Move QOM typedefs and add missing includes". Probably not worth fixing there. Possibly worth mentioning in the commit message.
Laurent Vivier
AppliedLe 09/05/2022 à 10:46, Philippe Mathieu-Daudé a écrit :
Quoted 14 lines
From: Philippe Mathieu-Daudé <[email protected]>
"
qom/object.h" doesn't need to include itself.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/qom/object.h | 1 - 1 file changed, 1 deletion(-)include/qom/object.h +0
-0
include/qom/object.h line 21
Quoted 7 lines
include/qom/object.h +0
-1@@ -16,7 +16,6 @@#include "qapi/qapi-builtin-types.h" #include "qemu/module.h" -#include "qom/object.h" struct TypeImpl ;typedef struct TypeImpl *Type ;
Applied to my trivial-patches branch.
Thanks,
Laurent