diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-05-28 13:31:52 -0400 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2020-05-28 13:33:47 -0400 |
commit | e52149944e0ceb78a8837daafbbfb571f9c6ccc0 (patch) | |
tree | 3405b2bdfa403108b7a8d103e4be65dde21b2b87 /icetime/iceutil.cc | |
parent | cd2610e0fa1c6a90e8e4e4cfe06db1b474e752bb (diff) | |
download | icestorm-e52149944e0ceb78a8837daafbbfb571f9c6ccc0.tar.gz icestorm-e52149944e0ceb78a8837daafbbfb571f9c6ccc0.tar.bz2 icestorm-e52149944e0ceb78a8837daafbbfb571f9c6ccc0.zip |
icetime: avoid string + int Clang warning
Clang warns that "adding 'int' to a string does not append to the string".
Although a false positive it's trivially avoided by using the array index
equivalent &PREFIX[1].
Diffstat (limited to 'icetime/iceutil.cc')
-rw-r--r-- | icetime/iceutil.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/icetime/iceutil.cc b/icetime/iceutil.cc index ad8d662..440b9a8 100644 --- a/icetime/iceutil.cc +++ b/icetime/iceutil.cc @@ -155,7 +155,7 @@ std::string find_chipdb(std::string config_device) #else homepath += getenv("HOME"); #endif - homepath += std::string(PREFIX + 1) + "/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt"; + homepath += std::string(&PREFIX[1]) + "/" CHIPDB_SUBDIR "/chipdb-" + config_device + ".txt"; if (verbose) fprintf(stderr, "Looking for chipdb '%s' at %s\n", config_device.c_str(), homepath.c_str()); if (file_test_open(homepath)) |