Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed some compiler warnings
  • Loading branch information
joc02012 committed May 24, 2012
1 parent 8fbc402 commit ceca949
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion osd-target/mtq.c
Expand Up @@ -94,7 +94,7 @@ int mtq_run_query(struct db_context *dbc, uint64_t pid, uint64_t cid,
" WHERE coll.pid = coll.pid AND coll.oid = attr.oid AND "
" coll.pid = %llu AND coll.cid = %llu ", coll, attr,
llu(pid), llu(cid));
sprintf(cp, select_stmt);
strncpy(cp, select_stmt, MAXSQLEN*factor);
sqlen += strlen(cp);
cp += sqlen;
for (i = 0; i < qc->qc_cnt; i++) {
Expand Down
4 changes: 2 additions & 2 deletions osd-target/osd-sense.c
Expand Up @@ -59,7 +59,7 @@ static int sense_info_build(uint8_t *data, int len, uint32_t not_init_funcs,
set_htonl(&data[12], completed_funcs);
set_htonll(&data[16], pid);
set_htonll(&data[24], oid);
osd_warning(" identification pid=%lx oid=%lx",pid, oid);
osd_warning(" identification pid=%llx oid=%llx",pid, oid);
return 32;
}

Expand All @@ -73,7 +73,7 @@ static int sense_csi_build(uint8_t *data, int len, uint64_t csi)
data[0] = 0x1;
data[1] = 0xa;
set_htonll(&data[4], csi);
osd_warning(" command-specific information=%lx",csi);
osd_warning(" command-specific information=%llx",csi);
return 12;
}

Expand Down
6 changes: 3 additions & 3 deletions osd-target/osd.c
Expand Up @@ -956,7 +956,7 @@ static int osd_initialize_db(struct osd_device *osd)

/* set root object attributes */
for (i=0; i<ARRAY_SIZE(root_info); i++) {
struct init_attr *ia = &root_info[i];
const struct init_attr *ia = &root_info[i];
ret = attr_set_attr(osd->dbc, ROOT_PID , ROOT_OID, ia->page,
ia->number, ia->s, strlen(ia->s)+1);
if (ret != SQLITE_OK)
Expand All @@ -969,7 +969,7 @@ static int osd_initialize_db(struct osd_device *osd)
* are different.
*/
for (i=0; i<ARRAY_SIZE(partition_info); i++) {
struct init_attr *ia = &partition_info[i];
const struct init_attr *ia = &partition_info[i];
ret = attr_set_attr(osd->dbc, ROOT_PID, ROOT_OID, ia->page,
ia->number, ia->s, strlen(ia->s)+1);
if (ret)
Expand Down Expand Up @@ -2532,7 +2532,7 @@ int osd_list(struct osd_device *osd, uint8_t list_attr, uint64_t pid,
add_len = (uint64_t) -1;
set_htonll(outdata, add_len);
set_htonll(&outdata[8], cont_id);
osd_error("%s: add_len=%lu cont_id=0x%lx", __func__, add_len, cont_id);
osd_error("%s: add_len=%llu cont_id=0x%llx", __func__, add_len, cont_id);
} else if (list_attr == 1 && get_attr->sz != 0 && pid != 0) {
if (list_id)
initial_oid = cont_id;
Expand Down

0 comments on commit ceca949

Please sign in to comment.