On 8/14/24 15:47, Richard Henderson wrote:
On 8/15/24 08:41, Pierrick Bouvier wrote:
Found on debian stable.

../target/i386/kvm/kvm.c: In function ‘kvm_handle_rdmsr’:
../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void 
function [-Werror=return-type]
   5345 | }
        | ^
../target/i386/kvm/kvm.c: In function ‘kvm_handle_wrmsr’:
../target/i386/kvm/kvm.c:5364:1: error: control reaches end of non-void 
function [-Werror=return-type]
   5364 | }

Signed-off-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
---
   target/i386/kvm/kvm.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 31f149c9902..ddec27edd5b 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -5770,7 +5770,7 @@ static int kvm_handle_rdmsr(X86CPU *cpu, struct kvm_run 
*run)
           }
       }
- assert(false);
+    g_assert_not_reached();

While a good change, and while I have always hated the assert(false) idiom, I 
believe this
points to a compiler bug and might be worth reporting -- assuming a later 
version of gcc
still warns.


Reported it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116386

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to