ref: refs/heads/master
commit c230a78a307a0919c13eea7902cda9d66a589d75
Author: Michael Andres <ma(a)suse.de>
Date: Tue Jun 2 12:36:44 2009 +0200
Fix to compile with -Werror=format-security
---
CMakeLists.txt | 4 ++--
zypp/parser/HistoryLogReader.cc | 2 +-
zypp/solver/detail/SATResolver.cc | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e3c1f0..7a411aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,8 +20,8 @@ MATH( EXPR LIBZYPP_AGE "${LIBZYPP_MINOR} - ${LIBZYPP_COMPATMINOR}" )
MATH( EXPR LIBZYPP_SO_FIRST "${LIBZYPP_CURRENT}-${LIBZYPP_AGE}" )
SET( VERSION "${LIBZYPP_MAJOR}.${LIBZYPP_MINOR}.${LIBZYPP_PATCH}" )
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed" )
-SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -g -Wall -Wl,-as-needed" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -Wall -Werror=format-security -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed" )
+SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -g -Wall -Werror=format-security -Wl,-as-needed" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3" )
diff --git a/zypp/parser/HistoryLogReader.cc b/zypp/parser/HistoryLogReader.cc
index 511b7d0..53b284f 100644
--- a/zypp/parser/HistoryLogReader.cc
+++ b/zypp/parser/HistoryLogReader.cc
@@ -111,7 +111,7 @@ namespace zypp
ParseException
e(str::form("Error in history log on line #%u.", lineNr));
e.addHistory(
- str::form("Bad number of fields. Got %ld, expected more than %d.",
+ str::form("Bad number of fields. Got %zd, expected more than %d.",
fields.size(), 2));
ZYPP_THROW(e);
}
diff --git a/zypp/solver/detail/SATResolver.cc b/zypp/solver/detail/SATResolver.cc
index e7d3524..3cfd604 100644
--- a/zypp/solver/detail/SATResolver.cc
+++ b/zypp/solver/detail/SATResolver.cc
@@ -939,10 +939,10 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
ret = str::form (_("problem with installed package %s"), solvable2str(pool, s.get()));
break;
case SOLVER_PROBLEM_JOB_RULE:
- ret = str::form (_("conflicting requests"));
+ ret = _("conflicting requests");
break;
case SOLVER_PROBLEM_RPM_RULE:
- ret = str::form (_("some dependency problem"));
+ ret = _("some dependency problem");
break;
case SOLVER_PROBLEM_JOB_NOTHING_PROVIDES_DEP:
ret = str::form (_("nothing provides requested %s"), dep2str(pool, dep));
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org