From e52149944e0ceb78a8837daafbbfb571f9c6ccc0 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 28 May 2020 13:31:52 -0400 Subject: 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]. --- icetime/iceutil.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'icetime/iceutil.cc') 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)) -- cgit v1.2.3