Add gcc-c90 branch
This commit is contained in:
parent
34dc7c2f25
commit
9e5ad07ee1
|
@ -0,0 +1,8 @@
|
|||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Subject: [PATCH] gcc error c90
|
||||
|
||||
Gcc non-c90 compliant code
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
---
|
|
@ -211,7 +211,11 @@ uu_panic(const char *format, ...)
|
|||
int
|
||||
assfail(const char *astring, const char *file, int line)
|
||||
{
|
||||
#if defined(__STDC__) && __STDC_VERSION__ - 0 >= 199901L
|
||||
__assert_c99(astring, file, line, "unknown func");
|
||||
#else
|
||||
__assert(astring, file, line);
|
||||
#endif
|
||||
/*NOTREACHED*/
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ int
|
|||
zprop_iter_common(zprop_func func, void *cb, boolean_t show_all,
|
||||
boolean_t ordered, zfs_type_t type)
|
||||
{
|
||||
int i, num_props, size, prop;
|
||||
int i, j, num_props, size, prop;
|
||||
zprop_desc_t *prop_tbl;
|
||||
zprop_desc_t **order;
|
||||
|
||||
|
@ -173,7 +173,7 @@ zprop_iter_common(zprop_func func, void *cb, boolean_t show_all,
|
|||
return (ZPROP_CONT);
|
||||
#endif
|
||||
|
||||
for (int j = 0; j < num_props; j++)
|
||||
for (j = 0; j < num_props; j++)
|
||||
order[j] = &prop_tbl[j];
|
||||
|
||||
if (ordered) {
|
||||
|
|
|
@ -3878,7 +3878,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev)
|
|||
* Copy buffers for L2ARC writing.
|
||||
*/
|
||||
mutex_enter(&l2arc_buflist_mtx);
|
||||
for (int try = 0; try <= 3; try++) {
|
||||
for (try = 0; try <= 3; try++) {
|
||||
list = l2arc_list_locked(try, &list_lock);
|
||||
passed_sz = 0;
|
||||
|
||||
|
|
|
@ -113,11 +113,13 @@ dbuf_find(dnode_t *dn, uint8_t level, uint64_t blkid)
|
|||
{
|
||||
dbuf_hash_table_t *h = &dbuf_hash_table;
|
||||
objset_impl_t *os = dn->dn_objset;
|
||||
uint64_t obj = dn->dn_object;
|
||||
uint64_t hv = DBUF_HASH(os, obj, level, blkid);
|
||||
uint64_t idx = hv & h->hash_table_mask;
|
||||
uint64_t obj, hv, idx;
|
||||
dmu_buf_impl_t *db;
|
||||
|
||||
obj = dn->dn_object;
|
||||
hv = DBUF_HASH(os, obj, level, blkid);
|
||||
idx = hv & h->hash_table_mask;
|
||||
|
||||
mutex_enter(DBUF_HASH_MUTEX(h, idx));
|
||||
for (db = h->hash_table[idx]; db != NULL; db = db->db_hash_next) {
|
||||
if (DBUF_EQUAL(db, os, obj, level, blkid)) {
|
||||
|
@ -146,11 +148,13 @@ dbuf_hash_insert(dmu_buf_impl_t *db)
|
|||
objset_impl_t *os = db->db_objset;
|
||||
uint64_t obj = db->db.db_object;
|
||||
int level = db->db_level;
|
||||
uint64_t blkid = db->db_blkid;
|
||||
uint64_t hv = DBUF_HASH(os, obj, level, blkid);
|
||||
uint64_t idx = hv & h->hash_table_mask;
|
||||
uint64_t blkid, hv, idx;
|
||||
dmu_buf_impl_t *dbf;
|
||||
|
||||
blkid = db->db_blkid;
|
||||
hv = DBUF_HASH(os, obj, level, blkid);
|
||||
idx = hv & h->hash_table_mask;
|
||||
|
||||
mutex_enter(DBUF_HASH_MUTEX(h, idx));
|
||||
for (dbf = h->hash_table[idx]; dbf != NULL; dbf = dbf->db_hash_next) {
|
||||
if (DBUF_EQUAL(dbf, os, obj, level, blkid)) {
|
||||
|
@ -180,11 +184,13 @@ static void
|
|||
dbuf_hash_remove(dmu_buf_impl_t *db)
|
||||
{
|
||||
dbuf_hash_table_t *h = &dbuf_hash_table;
|
||||
uint64_t hv = DBUF_HASH(db->db_objset, db->db.db_object,
|
||||
db->db_level, db->db_blkid);
|
||||
uint64_t idx = hv & h->hash_table_mask;
|
||||
uint64_t hv, idx;
|
||||
dmu_buf_impl_t *dbf, **dbp;
|
||||
|
||||
hv = DBUF_HASH(db->db_objset, db->db.db_object,
|
||||
db->db_level, db->db_blkid);
|
||||
idx = hv & h->hash_table_mask;
|
||||
|
||||
/*
|
||||
* We musn't hold db_mtx to maintin lock ordering:
|
||||
* DBUF_HASH_MUTEX > db_mtx.
|
||||
|
|
|
@ -91,11 +91,13 @@ parent_delta(dsl_dataset_t *ds, int64_t delta)
|
|||
void
|
||||
dsl_dataset_block_born(dsl_dataset_t *ds, blkptr_t *bp, dmu_tx_t *tx)
|
||||
{
|
||||
int used = bp_get_dasize(tx->tx_pool->dp_spa, bp);
|
||||
int compressed = BP_GET_PSIZE(bp);
|
||||
int uncompressed = BP_GET_UCSIZE(bp);
|
||||
int used, compressed, uncompressed;
|
||||
int64_t delta;
|
||||
|
||||
used = bp_get_dasize(tx->tx_pool->dp_spa, bp);
|
||||
compressed = BP_GET_PSIZE(bp);
|
||||
uncompressed = BP_GET_UCSIZE(bp);
|
||||
|
||||
dprintf_bp(bp, "born, ds=%p\n", ds);
|
||||
|
||||
ASSERT(dmu_tx_is_syncing(tx));
|
||||
|
|
|
@ -3205,7 +3205,7 @@ append_options(char *mntopts, char *newopts)
|
|||
/* original length plus new string to append plus 1 for the comma */
|
||||
if (len + 1 + strlen(newopts) >= MNT_LINE_MAX) {
|
||||
(void) fprintf(stderr, gettext("the opts argument for "
|
||||
"'%c' option is too long (more than %d chars)\n"),
|
||||
"'%s' option is too long (more than %d chars)\n"),
|
||||
"-o", MNT_LINE_MAX);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue