mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1011 from hzeller/fix-constructing-string-from-int
Fix two instances of integer-assignment to string.
This commit is contained in:
commit
4fd0e11214
|
@ -105,7 +105,8 @@ struct CoverPass : public Pass {
|
||||||
#else
|
#else
|
||||||
char filename_buffer[4096];
|
char filename_buffer[4096];
|
||||||
snprintf(filename_buffer, 4096, "%s/yosys_cover_%d_XXXXXX.txt", filename.c_str(), getpid());
|
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
|
#endif
|
||||||
}
|
}
|
||||||
FILE *f = fopen(filename.c_str(), open_mode);
|
FILE *f = fopen(filename.c_str(), open_mode);
|
||||||
|
|
|
@ -94,7 +94,7 @@ int LibertyParser::lexer(std::string &str)
|
||||||
|
|
||||||
// search for identifiers, numbers, plus or minus.
|
// search for identifiers, numbers, plus or minus.
|
||||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.') {
|
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) {
|
while (1) {
|
||||||
c = f.get();
|
c = f.get();
|
||||||
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.')
|
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.')
|
||||||
|
|
Loading…
Reference in New Issue