Project

General

Profile

Actions

Fix #13006

closed

compile warning on gcc-4.8.3

Added by hongwei bi over 8 years ago. Updated about 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

There is a compiling warning:

os/Transaction.cc: In member function ‘void ObjectStore::Transaction::_build_actions_from_tbl()’:
os/Transaction.cc:287:33: warning: ‘void ObjectStore::Transaction::collection_move(coll_t, coll_t, const

ghobject_t&)’ is deprecated (declared at os/ObjectStore.h:1245) [-Wdeprecated-declarations]
collection_move(ncid, ocid, oid);

The warning message appeared because We use collection_move which has deprecated attribute.
So I want to know Whether we should take one of the following two methods:

1 add #pragma GCC diagnostic ignored "-Wdeprecated-declarations" in Transaction.cc, as the following patch:

--- a/src/os/Transaction.cc
+++ b/src/os/Transaction.cc
-284,7 +284,10 void ObjectStore::Transaction::_build_actions_from_tbl()
assert(ocid2 ocid);
assert(oid2 oid);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
collection_move(ncid, ocid, oid);
+#pragma GCC diagnostic pop

2 just add some obvious code comments in ObjectStore.h, as the following patch:

--- a/src/os/ObjectStore.h
+ b/src/os/ObjectStore.h
-1244,6 +1244,11 public:
}
data.ops
;
}

/**
+ * Note: here we use deprecated attribute, so there will be a
+ * warning when compiling the code.
+ */
void collection_move(coll_t cid, coll_t oldcid, const ghobject_t& oid)


Related issues 1 (1 open0 closed)

Copied from Ceph - Fix #13005: compile warning on gcc-4.8.3 New09/09/2015

Actions
Actions #1

Updated by Jos Collin about 7 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF