From 655122418d714f342b5d9789f45f8035f3fe8b9a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 1 Mar 2014 15:11:42 +0100 Subject: =?UTF-8?q?warning:=20unused=20parameter=20=E2=80=98foo=E2=80=99?= =?UTF-8?q?=20[-Wunused-parameter]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-By: gcc -Wunused-parameter Git-Dch: Ignore --- apt-inst/deb/debfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-inst/deb/debfile.cc') diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index a811bbe88..8684f03f7 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -194,7 +194,7 @@ bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd) // --------------------------------------------------------------------- /* Just memcopy the block from the tar extractor and put it in the right place in the pre-allocated memory block. */ -bool debDebFile::MemControlExtract::Process(Item &Itm,const unsigned char *Data, +bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data, unsigned long Size,unsigned long Pos) { memcpy(Control + Pos, Data,Size); -- cgit v1.2.3 From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- apt-inst/deb/debfile.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'apt-inst/deb/debfile.cc') diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 8684f03f7..3803329fa 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -21,11 +21,17 @@ #include #include #include -#include #include - +#include +#include +#include +#include + +#include +#include +#include #include -#include + #include /*}}}*/ -- cgit v1.2.3 From b68ce88357daf362e60d7f8f131041289c8db690 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 17 Mar 2014 13:43:12 +0100 Subject: apt-inst: Do not try to create a substring of an empty string in error reporting One of our compressors (the empty one) has an empty extension. Calling substr on it fails. --- apt-inst/deb/debfile.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apt-inst/deb/debfile.cc') diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 3803329fa..a63cb6716 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -124,8 +124,10 @@ bool debDebFile::ExtractTarMember(pkgDirStream &Stream,const char *Name) { std::string ext = std::string(Name) + ".{"; for (std::vector::const_iterator c = compressor.begin(); - c != compressor.end(); ++c) - ext.append(c->Extension.substr(1)); + c != compressor.end(); ++c) { + if (!c->Extension.empty()) + ext.append(c->Extension.substr(1)); + } ext.append("}"); return _error->Error(_("Internal error, could not locate member %s"), ext.c_str()); } -- cgit v1.2.3