Take out some 'typename's to support older versions of gcc (Heinz).

This commit is contained in:
Joe Thornber
2013-08-15 10:35:07 +01:00
parent c6ec0c9c9c
commit 77286e0bc7
8 changed files with 18 additions and 18 deletions

View File

@@ -42,7 +42,7 @@ namespace {
block_manager<>::ptr open_bm(string const &dev_path, bool writeable) {
block_address nr_blocks = get_nr_blocks(dev_path);
typename block_io<>::mode m = writeable ?
block_io<>::mode m = writeable ?
block_io<>::READ_WRITE :
block_io<>::READ_ONLY;

View File

@@ -139,7 +139,7 @@ namespace {
class details_extractor : public btree<1, device_tree_detail::device_details_traits>::visitor {
public:
typedef typename btree<1, device_tree_detail::device_details_traits>::visitor::node_location node_location;
typedef btree<1, device_tree_detail::device_details_traits>::visitor::node_location node_location;
typedef boost::shared_ptr<details_extractor> ptr;
typedef btree_checker<1, device_tree_detail::device_details_traits> checker;

View File

@@ -144,7 +144,7 @@ namespace {
block_manager<>::ptr
open_bm(string const &path) {
block_address nr_blocks = get_nr_blocks(path);
typename block_io<>::mode m = block_io<>::READ_ONLY;
block_io<>::mode m = block_io<>::READ_ONLY;
return block_manager<>::ptr(new block_manager<>(path, nr_blocks, 1, m));
}
@@ -344,13 +344,12 @@ namespace {
int main(int argc, char **argv)
{
int c;
flags fs = {
.check_device_tree = true,
.check_mapping_tree_level1 = true,
.check_mapping_tree_level2 = true,
.ignore_non_fatal_errors = false,
.quiet = false
};
flags fs;
fs.check_device_tree = true;
fs.check_mapping_tree_level1 = true,
fs.check_mapping_tree_level2 = true,
fs.ignore_non_fatal_errors = false,
fs.quiet = false;
char const shortopts[] = "qhV";
option const longopts[] = {

View File

@@ -94,7 +94,8 @@ int main(int argc, char **argv)
char *end_ptr;
string format = "xml";
block_address metadata_snap = 0;
struct flags flags = { .find_metadata_snap = false, .repair = false };
struct flags flags;
flags.find_metadata_snap = flags.repair = false;
const struct option longopts[] = {
{ "help", no_argument, NULL, 'h'},

View File

@@ -23,7 +23,7 @@ namespace {
block_manager<>::ptr
open_bm(string const &path) {
block_address nr_blocks = get_nr_blocks(path);
typename block_io<>::mode m = block_io<>::READ_ONLY;
block_io<>::mode m = block_io<>::READ_ONLY;
return block_manager<>::ptr(new block_manager<>(path, nr_blocks, 1, m));
}