summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/hashes.cc2
-rw-r--r--apt-pkg/contrib/hashsum_template.h2
-rw-r--r--apt-pkg/contrib/strutl.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 46cf0ba08..05a137653 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -276,7 +276,7 @@ public:
unsigned long long FileSize;
unsigned int CalcHashes;
- PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
+ explicit PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
};
/*}}}*/
// Hashes::Add* - Add the contents of data or FD /*{{{*/
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index 869dc5cb7..d0ea0971e 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -87,7 +87,7 @@ class HashSumValue
Sum[I] = S[I];
}
- HashSumValue(std::string Str)
+ explicit HashSumValue(std::string const &Str)
{
memset(Sum,0,sizeof(Sum));
Set(Str);
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 5731b5a2b..05624f7fb 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1308,7 +1308,7 @@ void ioprintf(ostream &out,const char *format,...)
va_list args;
ssize_t size = 400;
while (true) {
- bool ret = false;
+ bool ret;
va_start(args,format);
ret = iovprintf(out, format, args, size);
va_end(args);
@@ -1322,7 +1322,7 @@ void strprintf(string &out,const char *format,...)
ssize_t size = 400;
std::ostringstream outstr;
while (true) {
- bool ret = false;
+ bool ret;
va_start(args,format);
ret = iovprintf(outstr, format, args, size);
va_end(args);