1 Star 0 Fork 7

Jason011125/jfsutils

forked from src-openEuler/jfsutils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-building-against-gcc-10.patch 2.49 KB
一键复制 编辑 原始数据 按行查看 历史
shixuantong 提交于 2021-07-31 16:19 . fix building against gcc-10
From e48d079f0386c6630d107897e689ea6c4511479f Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Thu, 20 Aug 2020 19:34:45 +0200
Subject: sys-fs/jfsutils: fix building against gcc-10
Closes: https://bugs.gentoo.org/707314
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
fscklog/display.c | 2 +-
libfs/logredo.c | 21 +++++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/fscklog/display.c b/fscklog/display.c
index a33d44f..dadd07f 100644
--- a/fscklog/display.c
+++ b/fscklog/display.c
@@ -54,7 +54,7 @@ FILE *infp;
* output: fsck extracted service log I/O buffer
*
*/
-char xchklog_buffer[XCHKLOG_BUFSIZE];
+static char xchklog_buffer[XCHKLOG_BUFSIZE];
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*
diff --git a/libfs/logredo.c b/libfs/logredo.c
index eb897e8..d6204b7 100644
--- a/libfs/logredo.c
+++ b/libfs/logredo.c
@@ -87,9 +87,9 @@ int32_t bmap_stg_bytes = 0;
* S T U F F F O R T H E L O G
*
*/
-struct logsuper logsup; /* log super block */
-int32_t numdoblk; /* number of do blocks used */
-int32_t numnodofile; /* number of nodo file blocks used */
+static struct logsuper logsup; /* log super block */
+static int32_t numdoblk; /* number of do blocks used */
+static int32_t numnodofile; /* number of nodo file blocks used */
int32_t numExtDtPg = 0; /* number of extended dtpage blocks used */
/*
@@ -129,7 +129,7 @@ int32_t use_2ndary_agg_superblock;
*/
/* buffer header table */
-struct bufhdr {
+static struct bufhdr {
int16_t next; /* 2: next on free/lru list */
int16_t prev; /* 2: previous on free/lru list */
int16_t hnext; /* 2: next on hash chain */
@@ -142,7 +142,7 @@ struct bufhdr {
} bufhdr[NBUFPOOL]; /* (24) */
/* buffer table */
-struct bufpool {
+static struct bufpool {
char bytes[PSIZE];
} buffer[NBUFPOOL - 1];
@@ -151,15 +151,16 @@ struct bufpool {
*
* log has its own 4 page buffer pool.
*/
-uint8_t afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
+static uint8_t afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
/*
* Miscellaneous
*/
-caddr_t prog; /* Program name */
-int32_t mntcnt, bufsize;
-char *mntinfo;
-int32_t retcode; /* return code from logredo */
+static caddr_t prog; /* Program name */
+static int32_t mntcnt;
+static int32_t bufsize;
+static char *mntinfo;
+static int32_t retcode; /* return code from logredo */
int end_of_transaction = 0;
/*
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Jason_828e/jfsutils.git
git@gitee.com:Jason_828e/jfsutils.git
Jason_828e
jfsutils
jfsutils
master

搜索帮助