mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 12:12:13 +03:00
OpenZFS 8081 - Compiler warnings in zdb
Fix compiler warnings in zdb. With these changes, FreeBSD can compile zdb with all compiler warnings enabled save -Wunused-parameter. usr/src/cmd/zdb/zdb.c usr/src/cmd/zdb/zdb_il.c usr/src/uts/common/fs/zfs/sys/sa.h usr/src/uts/common/fs/zfs/sys/spa.h Fix numerous warnings, including: * const-correctness * shadowing global definitions * signed vs unsigned comparisons * missing prototypes, or missing static declarations * unused variables and functions * Unreadable array initializations * Missing struct initializers usr/src/cmd/zdb/zdb.h Add a header file to declare common symbols usr/src/lib/libzpool/common/sys/zfs_context.h usr/src/uts/common/fs/zfs/arc.c usr/src/uts/common/fs/zfs/dbuf.c usr/src/uts/common/fs/zfs/spa.c usr/src/uts/common/fs/zfs/txg.c Add a function prototype for zk_thread_create, and ensure that every callback supplied to this function actually matches the prototype. usr/src/cmd/ztest/ztest.c usr/src/uts/common/fs/zfs/sys/zil.h usr/src/uts/common/fs/zfs/zfs_replay.c usr/src/uts/common/fs/zfs/zvol.c Add a function prototype for zil_replay_func_t, and ensure that every function of this type actually matches the prototype. usr/src/uts/common/fs/zfs/sys/refcount.h Change FTAG so it discards any constness of __func__, necessary since existing APIs expect it passed as void *. Porting Notes: - Many of these fixes have already been applied to Linux. For consistency the OpenZFS version of a change was applied if the warning was addressed in an equivalent but different fashion. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Authored by: Alan Somers <asomers@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/8081 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/843abe1b8a Closes #6787
This commit is contained in:
+4
-4
@@ -108,8 +108,8 @@
|
||||
* now transition to the syncing state.
|
||||
*/
|
||||
|
||||
static void txg_sync_thread(void *dp);
|
||||
static void txg_quiesce_thread(void *dp);
|
||||
static void txg_sync_thread(void *arg);
|
||||
static void txg_quiesce_thread(void *arg);
|
||||
|
||||
int zfs_txg_timeout = 5; /* max seconds worth of delta per txg */
|
||||
|
||||
@@ -479,7 +479,7 @@ txg_wait_callbacks(dsl_pool_t *dp)
|
||||
static void
|
||||
txg_sync_thread(void *arg)
|
||||
{
|
||||
dsl_pool_t *dp = (dsl_pool_t *)arg;
|
||||
dsl_pool_t *dp = arg;
|
||||
spa_t *spa = dp->dp_spa;
|
||||
tx_state_t *tx = &dp->dp_tx;
|
||||
callb_cpr_t cpr;
|
||||
@@ -564,7 +564,7 @@ txg_sync_thread(void *arg)
|
||||
static void
|
||||
txg_quiesce_thread(void *arg)
|
||||
{
|
||||
dsl_pool_t *dp = (dsl_pool_t *)arg;
|
||||
dsl_pool_t *dp = arg;
|
||||
tx_state_t *tx = &dp->dp_tx;
|
||||
callb_cpr_t cpr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user