diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-08-27 14:05:57 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-08-27 14:05:57 +0200 |
commit | 0e8b934e6007545b1a0af0fde11bfca36b72cd6a (patch) | |
tree | bb739538eb0edaccae3fc276975ddc8c0948414f /lib/plugins | |
parent | f76b61fdd8e4423e4e5604c91578e46bf65c3242 (diff) | |
download | abrt-0e8b934e6007545b1a0af0fde11bfca36b72cd6a.tar.gz abrt-0e8b934e6007545b1a0af0fde11bfca36b72cd6a.tar.xz abrt-0e8b934e6007545b1a0af0fde11bfca36b72cd6a.zip |
CCpp.cpp: add -Wall -Werror, fix two discovered bugs
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/CCpp.cpp | 9 | ||||
-rw-r--r-- | lib/plugins/Makefile.am | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/plugins/CCpp.cpp b/lib/plugins/CCpp.cpp index 01866d62..c6bbaf28 100644 --- a/lib/plugins/CCpp.cpp +++ b/lib/plugins/CCpp.cpp @@ -549,7 +549,7 @@ string CAnalyzerCCpp::GetLocalUUID(const char *pDebugDumpDir) if (unstrip_n_output) GetIndependentBuildIdPC(unstrip_n_output, independentBuildIdPC); else - VERB3 error_msg("run_unstrip_n() returns `NULL', broken coredump/eu-unstrip?"); + VERB3 error_msg("run_unstrip_n() returns NULL, broken coredump/eu-unstrip?"); free(unstrip_n_output); @@ -786,7 +786,7 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force) dd.LoadText(CD_UID, UID); dd.Close(); /* do not keep dir locked longer than needed */ - char *build_ids; + char *build_ids = NULL; if (m_bInstallDebugInfo && DebuginfoCheckPolkit(xatoi_u(UID.c_str()))) { if (m_nDebugInfoCacheMB > 0) @@ -798,11 +798,10 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force) /* Create and store backtrace. */ char *backtrace_str = get_backtrace(pDebugDumpDir, m_sDebugInfoDirs.c_str()); - if (!backtrace_str) { - backtrace_str = ""; - VERB3 log("get_backtrace() retruns `NULL', broken core/gdb?"); + backtrace_str = xstrdup(""); + VERB3 log("get_backtrace() returns NULL, broken core/gdb?"); } char *bt_build_ids = xasprintf("%s%s", backtrace_str, (build_ids) ? build_ids : ""); diff --git a/lib/plugins/Makefile.am b/lib/plugins/Makefile.am index 147a778e..a896e144 100644 --- a/lib/plugins/Makefile.am +++ b/lib/plugins/Makefile.am @@ -67,7 +67,8 @@ UTILS_PATH=$(srcdir)/../utils libCCpp_la_SOURCES = CCpp.cpp CCpp.h CCpp_sha1.cpp CCpp_sha1.h libCCpp_la_LDFLAGS = -avoid-version #libCCpp_la_LIBADD = -libCCpp_la_CPPFLAGS = -I$(INC_PATH) -I$(UTILS_PATH) \ +libCCpp_la_CPPFLAGS = -Wall -Werror \ + -I$(INC_PATH) -I$(UTILS_PATH) \ -DCCPP_HOOK_PATH=\"${libexecdir}/abrt-hook-ccpp\" \ -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \ -DLOCALSTATEDIR='"$(localstatedir)"' |