qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-8.1] block/dmg: Declare a type definition for DMG uncompr


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-8.1] block/dmg: Declare a type definition for DMG uncompress function
Date: Mon, 20 Mar 2023 16:56:01 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 20/3/23 16:26, Philippe Mathieu-Daudé wrote:
Introduce the BdrvDmgUncompressFunc type defintion. To emphasis
dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions,
declare them using this new typedef.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  block/dmg.h | 8 ++++----
  block/dmg.c | 7 ++-----
  2 files changed, 6 insertions(+), 9 deletions(-)


diff --git a/block/dmg.c b/block/dmg.c
index e10b9a2ba5..2769900359 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -31,11 +31,8 @@
  #include "qemu/memalign.h"
  #include "dmg.h"
-int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
-                          char *next_out, unsigned int avail_out);
-
-int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
-                            char *next_out, unsigned int avail_out);
+BdrvDmgUncompressFunc *dmg_uncompress_bz2;
+BdrvDmgUncompressFunc *dmg_uncompress_lzfse;

Unrelated, but since DMG maintainers are Cc'ed, upstream lzfse warning:

In file included from ../../block/dmg-lzfse.c:26:
/opt/homebrew/Cellar/lzfse/1.0/include/lzfse.h:56:43: warning: this function declaration is not a prototype [-Wstrict-prototypes]
LZFSE_API size_t lzfse_encode_scratch_size();
                                          ^
                                           void

Unfortunately last upstream activity was 6 years ago...
https://github.com/lzfse/lzfse/pulls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]