From 3c8cda8b05d6eeaef76c7ccc673fe378b0c74f37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 18:14:29 +0100 Subject: fix various -Wall warnings --- methods/http.cc | 3 ++- methods/https.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'methods') diff --git a/methods/http.cc b/methods/http.cc index 26d435dea..b3c791fa0 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -941,7 +941,8 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) if (Srv->StartPos >= 0) { Res.ResumePoint = Srv->StartPos; - ftruncate(File->Fd(),Srv->StartPos); + if (ftruncate(File->Fd(),Srv->StartPos) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } // Set the start point diff --git a/methods/https.cc b/methods/https.cc index e53ba1a11..98dfeefa1 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -249,7 +249,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) if(success != 0) { unlink(File->Name().c_str()); - _error->Error(curl_errorstr); + _error->Error("%s", curl_errorstr); Fail(); return true; } -- cgit v1.2.3