lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210601140820.2626615-1-trix@redhat.com>
Date:   Tue,  1 Jun 2021 07:08:20 -0700
From:   trix@...hat.com
To:     dhowells@...hat.com, marc.dionne@...istor.com
Cc:     linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Tom Rix <trix@...hat.com>
Subject: [PATCH] afs: add a return to afs_dir_set_page_dirty()

From: Tom Rix <trix@...hat.com>

With gcc 10.3, this compile error is reported
dir.c: In function 'afs_dir_set_page_dirty':
dir.c:51:1: error: no return statement in function
  returning non-void [-Werror=return-type]

Even though the code is unreachable, add a return
to silence the error.

Signed-off-by: Tom Rix <trix@...hat.com>
---
 fs/afs/dir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 78719f2f567e..988766f88d8b 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -48,6 +48,7 @@ static void afs_dir_invalidatepage(struct page *page, unsigned int offset,
 static int afs_dir_set_page_dirty(struct page *page)
 {
 	BUG(); /* This should never happen. */
+	return -EINVAL;
 }
 
 const struct file_operations afs_dir_file_operations = {
-- 
2.26.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ