[PATCH 0/2] lib: Annotate more functions as NULL terminated

Michal Privoznik posted 2 patches 4 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1717596128.git.mprivozn@redhat.com
src/qemu/qemu_monitor.h            | 3 ++-
src/qemu/qemu_monitor_json.c       | 2 +-
tests/qemumigrationcookiexmltest.c | 2 +-
tests/qemumonitortestutils.c       | 2 +-
tests/qemumonitortestutils.h       | 3 ++-
tests/testutils.h                  | 3 ++-
tests/testutilsqemuschema.h        | 3 ++-
tools/vsh.c                        | 2 +-
8 files changed, 12 insertions(+), 8 deletions(-)
[PATCH 0/2] lib: Annotate more functions as NULL terminated
Posted by Michal Privoznik 4 months, 2 weeks ago
I'm working on something that's calling qemuMonitorCreateObjectProps()
and was getting random errors only to find out I was missing NULL
sentinel. This sparked me to look at other functions that might be
missing the G_GNUC_NULL_TERMINATED attribute too and found some.

Michal Prívozník (2):
  lib: Annotate more function as NULL terminated
  qemumonitortestutils: Fix G_GNUC_PRINTF annotation of
    qemuMonitorTestAddErrorResponse()

 src/qemu/qemu_monitor.h            | 3 ++-
 src/qemu/qemu_monitor_json.c       | 2 +-
 tests/qemumigrationcookiexmltest.c | 2 +-
 tests/qemumonitortestutils.c       | 2 +-
 tests/qemumonitortestutils.h       | 3 ++-
 tests/testutils.h                  | 3 ++-
 tests/testutilsqemuschema.h        | 3 ++-
 tools/vsh.c                        | 2 +-
 8 files changed, 12 insertions(+), 8 deletions(-)

-- 
2.44.1
Re: [PATCH 0/2] lib: Annotate more functions as NULL terminated
Posted by Ján Tomko 4 months, 1 week ago
On a Wednesday in 2024, Michal Privoznik wrote:
>I'm working on something that's calling qemuMonitorCreateObjectProps()
>and was getting random errors only to find out I was missing NULL
>sentinel. This sparked me to look at other functions that might be
>missing the G_GNUC_NULL_TERMINATED attribute too and found some.
>
>Michal Prívozník (2):
>  lib: Annotate more function as NULL terminated
>  qemumonitortestutils: Fix G_GNUC_PRINTF annotation of
>    qemuMonitorTestAddErrorResponse()
>
> src/qemu/qemu_monitor.h            | 3 ++-
> src/qemu/qemu_monitor_json.c       | 2 +-
> tests/qemumigrationcookiexmltest.c | 2 +-
> tests/qemumonitortestutils.c       | 2 +-
> tests/qemumonitortestutils.h       | 3 ++-
> tests/testutils.h                  | 3 ++-
> tests/testutilsqemuschema.h        | 3 ++-
> tools/vsh.c                        | 2 +-
> 8 files changed, 12 insertions(+), 8 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano