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

[xen staging] tools/xenalyze: Fix -Werror=nonnull failure



commit 1a485996d9c50f968e0cb437d3fc91d3942434e3
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jun 12 17:42:56 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Jun 15 18:04:20 2026 +0100

    tools/xenalyze: Fix -Werror=nonnull failure
    
    GCC 15.2 with Alpine Linux 3.24 fails with -Werror=nonnull, complaining that
    we're calling bzero(NULL, 128).
    
    This is a legitimate diagnostic.  xenalyze has it's own error() function
    shadowing the standard library one, and can in principle return when p is
    NULL.
    
    Extend the check in error() with ERR_MAX_TOLERABLE to short circuit the
    variable tolerance check.
    
    Suggested-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
 tools/xentrace/xenalyze.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index 876d59d42c..42feeb282e 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -8767,7 +8767,7 @@ void dump_raw(const char * s, struct record_info *ri)
 
 void error(enum error_level l, struct record_info *ri)
 {
-    if ( l > opt.tolerance )
+    if ( l > ERR_MAX_TOLERABLE || l > opt.tolerance )
     {
         if ( ri )
             dump_generic(warn, ri);
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.