Commit 7d690e7cb17f47245d5ab2f2ce514e8f144641fb
1 parent
405c3ba9
add format to fprintf and add missing break statement
Showing
1 changed file
with
2 additions
and
1 deletions
src/app/GLog.cpp
| @@ -707,7 +707,7 @@ void GLog::flush(bool force) | @@ -707,7 +707,7 @@ void GLog::flush(bool force) | ||
| 707 | if (m_stderr) | 707 | if (m_stderr) |
| 708 | std::cerr << line; | 708 | std::cerr << line; |
| 709 | if (m_file != NULL) | 709 | if (m_file != NULL) |
| 710 | - std::fprintf(m_file, line.c_str()); | 710 | + std::fprintf(m_file, "%s", line.c_str()); |
| 711 | 711 | ||
| 712 | // Set newline flag for next line | 712 | // Set newline flag for next line |
| 713 | m_newline = newline; | 713 | m_newline = newline; |
| @@ -751,6 +751,7 @@ void GLog::header(const std::string& arg, int level) | @@ -751,6 +751,7 @@ void GLog::header(const std::string& arg, int level) | ||
| 751 | break; | 751 | break; |
| 752 | case 3: | 752 | case 3: |
| 753 | text = "=== " + arg + " ==="; | 753 | text = "=== " + arg + " ==="; |
| 754 | + break; | ||
| 754 | default: | 755 | default: |
| 755 | break; | 756 | break; |
| 756 | } | 757 | } |