[gfs2-utils] branch main updated: Misc. cleanups
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch main
in repository gfs2-utils.
The following commit(s) were added to refs/heads/main by this push:
new 43fac0a0 Misc. cleanups
43fac0a0 is described below
commit 43fac0a0c7766b8fb587bd67ab64f051210767a6
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed May 31 09:43:15 2023 +0100
Misc. cleanups
Fixes sparse warnings:
rgrepair.c:23:10: warning: symbol 'nrgrp' was not declared. Should it be static?
main_mkfs.c:114:10: warning: symbol 'nrgrp' was not declared. Should it be static?
progress.c:72:29: warning: Using plain integer as NULL pointer
main.c:34:25: warning: Using plain integer as NULL pointer
main_jadd.c:349:36: warning: Variable length array is used.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/rgrepair.c | 2 +-
gfs2/mkfs/main_jadd.c | 12 +++++++++---
gfs2/mkfs/main_mkfs.c | 2 +-
gfs2/mkfs/progress.c | 2 +-
gfs2/tune/main.c | 2 +-
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index eb654adf..3e14ffa4 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -20,7 +20,7 @@ static int rindex_modified = 0;
static struct special_blocks false_rgrps;
static struct osi_root rgcalc;
/* Number of resource groups */
-uint64_t nrgrp = 0;
+static uint64_t nrgrp = 0;
#define BAD_RG_PERCENT_TOLERANCE 11
#define AWAY_FROM_BITMAPS 0x1000
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index 70545255..438250a9 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -346,15 +346,20 @@ close_fd:
static int add_qc(struct lgfs2_sbd *sdp, struct jadd_opts *opts)
{
int fd, error = 0;
- char new_name[256], buf[sdp->sd_bsize];
+ char new_name[256], *buf;
unsigned int blocks =
sdp->qcsize << (20 - sdp->sd_bsize_shift);
unsigned int x;
struct gfs2_meta_header mh;
- if ((fd = create_new_inode(opts, NULL)) < 0)
- return fd;
+ buf = calloc(1, sdp->sd_bsize);
+ if (buf == NULL)
+ return -1;
+ if ((fd = create_new_inode(opts, NULL)) < 0) {
+ free(buf);
+ return fd;
+ }
if ((error = set_flags(fd, JA_FL_CLEAR, FS_JOURNAL_DATA_FL)))
goto close_fd;
@@ -397,6 +402,7 @@ static int add_qc(struct lgfs2_sbd *sdp, struct jadd_opts *opts)
goto close_fd;
}
close_fd:
+ free(buf);
return close(fd) || error;
}
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 3ac1f6cf..264ef832 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -111,7 +111,7 @@ struct mkfs_dev {
};
/* Number of resource groups */
-uint64_t nrgrp = 0;
+static uint64_t nrgrp = 0;
struct mkfs_opts {
unsigned bsize;
diff --git a/gfs2/mkfs/progress.c b/gfs2/mkfs/progress.c
index d4c27681..474e55f6 100644
--- a/gfs2/mkfs/progress.c
+++ b/gfs2/mkfs/progress.c
@@ -69,7 +69,7 @@ void gfs2_progress_update(struct gfs2_progress_bar *progress, uint64_t value)
if (progress->skip_progress || (!isatty(STDOUT_FILENO)))
return;
- current_time = time(0);
+ current_time = time(NULL);
if (current_time == last_update)
return;
last_update = current_time;
diff --git a/gfs2/tune/main.c b/gfs2/tune/main.c
index f72bdc3c..54281d58 100644
--- a/gfs2/tune/main.c
+++ b/gfs2/tune/main.c
@@ -31,7 +31,7 @@ static void parse_mount_options(char *arg)
} map[]= {
{ "lockproto=", &tfs->opt_proto, &tfs->proto },
{ "locktable=", &tfs->opt_table, &tfs->table },
- { NULL, 0, NULL }
+ { NULL, NULL, NULL }
};
s = arg;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
11 months
[gfs2-utils] branch main updated (8a732751 -> 7073956e)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
andyp pushed a change to branch main
in repository gfs2-utils.
from 8a732751 fsck.gfs2: Rename p1_check_eattr_entries to p1_check_eattr_entry
add b9cb06bb Improve compiler flag handling
add 7073956e Remove some CPPFLAGS duplication
No new revisions were added by this update.
Summary of changes:
configure.ac | 26 ++++++++++++++++++--------
gfs2/convert/Makefile.am | 7 ++-----
gfs2/edit/Makefile.am | 7 ++-----
gfs2/fsck/Makefile.am | 7 ++-----
gfs2/glocktop/Makefile.am | 8 +++-----
gfs2/libgfs2/Makefile.am | 5 +----
gfs2/libgfs2/checks.am | 3 +--
gfs2/mkfs/Makefile.am | 14 +++++++-------
gfs2/tune/Makefile.am | 6 ++----
tests/Makefile.am | 6 +-----
10 files changed, 39 insertions(+), 50 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
11 months