aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-02-25 11:21:39 +0000
committergatecat <gatecat@ds0.me>2021-02-25 15:15:25 +0000
commit23413a4d12ad070c8a356c5a3186f81def705c54 (patch)
treee18884eb5006aa991402b3576e188d7977ef88e8 /machxo2
parent17183fff05e52471ff4c619fc24e104234489803 (diff)
downloadnextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.tar.gz
nextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.tar.bz2
nextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.zip
Fix compiler warnings introduced by -Wextra
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'machxo2')
-rw-r--r--machxo2/arch.cc1
-rw-r--r--machxo2/archdefs.h1
-rw-r--r--machxo2/bitstream.cc14
3 files changed, 1 insertions, 15 deletions
diff --git a/machxo2/arch.cc b/machxo2/arch.cc
index 74bfc598..6a29dbb1 100644
--- a/machxo2/arch.cc
+++ b/machxo2/arch.cc
@@ -153,6 +153,7 @@ std::string Arch::get_full_chip_name() const
break;
case ArchArgs::SPEED_3:
name += "3";
+ break;
case ArchArgs::SPEED_4:
name += "4";
break;
diff --git a/machxo2/archdefs.h b/machxo2/archdefs.h
index f822b907..433b1b6b 100644
--- a/machxo2/archdefs.h
+++ b/machxo2/archdefs.h
@@ -48,7 +48,6 @@ struct Location
Location() : x(-1), y(-1){};
Location(int16_t x, int16_t y) : x(x), y(y){};
Location(const LocationPOD &pod) : x(pod.x), y(pod.y){};
- Location(const Location &loc) : x(loc.x), y(loc.y){};
bool operator==(const Location &other) const { return x == other.x && y == other.y; }
bool operator!=(const Location &other) const { return x != other.x || y != other.y; }
diff --git a/machxo2/bitstream.cc b/machxo2/bitstream.cc
index 37363b09..d695b094 100644
--- a/machxo2/bitstream.cc
+++ b/machxo2/bitstream.cc
@@ -114,20 +114,6 @@ static std::vector<bool> int_to_bitvector(int val, int size)
return bv;
}
-static std::vector<bool> str_to_bitvector(std::string str, int size)
-{
- std::vector<bool> bv;
- bv.resize(size, 0);
- if (str.substr(0, 2) != "0b")
- log_error("error parsing value '%s', expected 0b prefix\n", str.c_str());
- for (int i = 0; i < int(str.size()) - 2; i++) {
- char c = str.at((str.size() - i) - 1);
- NPNR_ASSERT(c == '0' || c == '1');
- bv.at(i) = (c == '1');
- }
- return bv;
-}
-
std::string intstr_or_default(const std::unordered_map<IdString, Property> &ct, const IdString &key,
std::string def = "0")
{