aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-05-15 13:35:52 +0200
committerGitHub <noreply@github.com>2019-05-15 13:35:52 +0200
commit4fd0e11214293ebdd7751bd2181b0e7399a80ed6 (patch)
tree8082310fd3b6c15e8f76fadfc14a41c5b1d3d64a
parent64b604207deefb87faa1aaf158012b7063526c6f (diff)
parent5e443a5d0db8f517582818e756871ec2e8117dbe (diff)
downloadyosys-4fd0e11214293ebdd7751bd2181b0e7399a80ed6.tar.gz
yosys-4fd0e11214293ebdd7751bd2181b0e7399a80ed6.tar.bz2
yosys-4fd0e11214293ebdd7751bd2181b0e7399a80ed6.zip
Merge pull request #1011 from hzeller/fix-constructing-string-from-int
Fix two instances of integer-assignment to string.
-rw-r--r--passes/cmds/cover.cc3
-rw-r--r--passes/techmap/libparse.cc2
2 files changed, 3 insertions, 2 deletions
diff --git a/passes/cmds/cover.cc b/passes/cmds/cover.cc
index 0ec747671..721ebded4 100644
--- a/passes/cmds/cover.cc
+++ b/passes/cmds/cover.cc
@@ -105,7 +105,8 @@ struct CoverPass : public Pass {
#else
char filename_buffer[4096];
snprintf(filename_buffer, 4096, "%s/yosys_cover_%d_XXXXXX.txt", filename.c_str(), getpid());
- filename = mkstemps(filename_buffer, 4);
+ mkstemps(filename_buffer, 4);
+ filename = filename_buffer;
#endif
}
FILE *f = fopen(filename.c_str(), open_mode);
diff --git a/passes/techmap/libparse.cc b/passes/techmap/libparse.cc
index 991cc4498..349ccc115 100644
--- a/passes/techmap/libparse.cc
+++ b/passes/techmap/libparse.cc
@@ -94,7 +94,7 @@ int LibertyParser::lexer(std::string &str)
// search for identifiers, numbers, plus or minus.
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.') {
- str = c;
+ str = static_cast<char>(c);
while (1) {
c = f.get();
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.')