NetBSD Problem Report #56494

From www@netbsd.org  Thu Nov 11 18:25:23 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3C5C71A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Nov 2021 18:25:23 +0000 (UTC)
Message-Id: <20211111182522.6A0F51A923A@mollari.NetBSD.org>
Date: Thu, 11 Nov 2021 18:25:22 +0000 (UTC)
From: hashikaw@mail.ru
Reply-To: hashikaw@mail.ru
To: gnats-bugs@NetBSD.org
Subject: uvm_loanobjpages at uvm_loan.c, error is uninitialized
X-Send-Pr-Version: www-1.0

>Number:         56494
>Category:       kern
>Synopsis:       uvm_loanobjpages at uvm_loan.c, error is uninitialized
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 11 18:30:00 +0000 2021
>Originator:     Kouichi Hashikawa
>Release:        9.9.92, 9-RELEASE
>Organization:
>Environment:
>Description:
I compile kernel with COPTS="-O -fno-omit-frame-pointer" (not -O2), then got error,

/current/netbsd/c/src/sys/uvm/uvm_loan.c:583:9: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  583 |  return error;
      |         ^~~~~
cc1: all warnings being treated as errors

I think NetBSD-9 has same problem.

>How-To-Repeat:

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.