[PATCH] viracpi: Fir error format string in virAcpiParseIORTNodeHeader()

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

 



Inside of virAcpiParseIORTNodeHeader() there's an
virReportError() which reports size of a structure using sizeof()
operator. Well, it's not well documented but the returned type of
sizeof() is apparently size_t but the format string uses %lu.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

Pushed under build breaker rule. Also verified this builds successfully
on a 32bit ARM.

 src/util/viracpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/viracpi.c b/src/util/viracpi.c
index 74fff0f0ac..e66df99f03 100644
--- a/src/util/viracpi.c
+++ b/src/util/viracpi.c
@@ -102,7 +102,7 @@ virAcpiParseIORTNodeHeader(int fd,
      * least size of header itself. */
     if (nodeHeader->len < sizeof(*nodeHeader)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("IORT table node type %1$s has invalid length: got %2$u, expected at least %3$lu"),
+                       _("IORT table node type %1$s has invalid length: got %2$u, expected at least %3$zu"),
                        NULLSTR(typeStr), (unsigned int)nodeHeader->len, sizeof(*nodeHeader));
         return -1;
     }
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux