diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-02-27 01:20:53 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-03-13 13:58:45 +0100 |
commit | d3e8fbb395f57954acd7a2095f02ce530a05ec6a (patch) | |
tree | f332d15d8bad25cd8c4c9da2924122507babe143 /methods | |
parent | 27511c011f9ade22e90e90e7acbeb87ba7324a19 (diff) |
warning: extra ‘;’ [-Wpedantic]
Git-Dch: Ignore
Reported-By: gcc -Wpedantic
Diffstat (limited to 'methods')
-rw-r--r-- | methods/cdrom.cc | 2 | ||||
-rw-r--r-- | methods/http.cc | 6 | ||||
-rw-r--r-- | methods/https.cc | 2 | ||||
-rw-r--r-- | methods/mirror.cc | 28 | ||||
-rw-r--r-- | methods/rsh.cc | 2 | ||||
-rw-r--r-- | methods/server.cc | 20 | ||||
-rw-r--r-- | methods/server.h | 2 |
7 files changed, 31 insertions, 31 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 22d4b9164..3c14d9dfb 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -62,7 +62,7 @@ CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly | MountedByApt(false) { UdevCdroms.Dlopen(); -}; +} /*}}}*/ // CDROMMethod::Exit - Unmount the disc if necessary /*{{{*/ // --------------------------------------------------------------------- diff --git a/methods/http.cc b/methods/http.cc index 42b31beeb..16c6d19e1 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -61,7 +61,7 @@ unsigned long long CircleBuf::BwReadLimit=0; unsigned long long CircleBuf::BwTickReadData=0; struct timeval CircleBuf::BwReadTick={0,0}; const unsigned int CircleBuf::BW_HZ=10; - + // CircleBuf::CircleBuf - Circular input buffer /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -87,8 +87,8 @@ void CircleBuf::Reset() { delete Hash; Hash = new Hashes; - } -}; + } +} /*}}}*/ // CircleBuf::Read - Read from a FD into the circular buffer /*{{{*/ // --------------------------------------------------------------------- diff --git a/methods/https.cc b/methods/https.cc index febe6a0f0..b0c7ee71d 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -432,7 +432,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) delete File; return true; -}; +} int main() { diff --git a/methods/mirror.cc b/methods/mirror.cc index 085f3717b..977eddcf5 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -60,7 +60,7 @@ using namespace std; MirrorMethod::MirrorMethod() : HttpMethod(), DownloadedMirrorFile(false), Debug(false) { -}; +} // HttpMethod::Configuration - Handle a configuration message /*{{{*/ // --------------------------------------------------------------------- @@ -90,17 +90,17 @@ bool MirrorMethod::Clean(string Dir) pkgSourceList list; list.ReadMainList(); - DIR *D = opendir(Dir.c_str()); + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - + string StartDir = SafeGetCWD(); if (chdir(Dir.c_str()) != 0) { closedir(D); return _error->Errno("chdir",_("Unable to change to %s"),Dir.c_str()); } - + for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) { // Skip some files.. @@ -123,23 +123,23 @@ bool MirrorMethod::Clean(string Dir) // nothing found, nuke it if (I == list.end()) unlink(Dir->d_name); - }; + } closedir(D); if (chdir(StartDir.c_str()) != 0) return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str()); - return true; + return true; } bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) { - // not that great to use pkgAcquire here, but we do not have + // not that great to use pkgAcquire here, but we do not have // any other way right now string fetch = BaseUri; fetch.replace(0,strlen("mirror://"),"http://"); -#if 0 // no need for this, the getArchitectures() will also include the main +#if 0 // no need for this, the getArchitectures() will also include the main // arch // append main architecture fetch += "?arch=" + _config->Find("Apt::Architecture"); @@ -173,7 +173,7 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) if(Debug) clog << "MirrorMethod::DownloadMirrorFile() success: " << res << endl; - + return res; } @@ -187,13 +187,13 @@ bool MirrorMethod::RandomizeMirrorFile(string mirror_file) if (!FileExists(mirror_file)) return false; - // read + // read ifstream in(mirror_file.c_str()); while ( !in.eof() ) { getline(in, line); content.push_back(line); } - + // we want the file to be random for each different machine, but also // "stable" on the same machine. this is to avoid running into out-of-sync // issues (i.e. Release/Release.gpg different on each mirror) @@ -422,10 +422,10 @@ bool MirrorMethod::Fetch(FetchItem *Itm) if(Debug) clog << "Fetch: " << Itm->Uri << endl << endl; - + // now run the real fetcher return HttpMethod::Fetch(Itm); -}; +} void MirrorMethod::Fail(string Err,bool Transient) { @@ -437,7 +437,7 @@ void MirrorMethod::Fail(string Err,bool Transient) // try the next mirror on fail (if its not a expected failure, // e.g. translations are ok to ignore) - if (!Queue->FailIgnore && TryNextMirror()) + if (!Queue->FailIgnore && TryNextMirror()) return; // all mirrors failed, so bail out diff --git a/methods/rsh.cc b/methods/rsh.cc index 550f77eca..f065f6b89 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -368,7 +368,7 @@ RSHMethod::RSHMethod() : pkgAcqMethod("1.0",SendConfig) signal(SIGINT,SigTerm); Server = 0; FailFd = -1; -}; +} /*}}}*/ // RSHMethod::Configuration - Handle a configuration message /*{{{*/ // --------------------------------------------------------------------- diff --git a/methods/server.cc b/methods/server.cc index ef90c809c..90e83d1af 100644 --- a/methods/server.cc +++ b/methods/server.cc @@ -119,10 +119,10 @@ bool ServerState::HeaderLine(string Line) string::size_type Pos2 = Pos; while (Pos2 < Line.length() && isspace(Line[Pos2]) != 0) Pos2++; - + string Tag = string(Line,0,Pos); string Val = string(Line,Pos2); - + if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0) { // Evil servers return no version @@ -159,14 +159,14 @@ bool ServerState::HeaderLine(string Line) } return true; - } - + } + if (stringcasecmp(Tag,"Content-Length:") == 0) { if (Encoding == Closes) Encoding = Stream; HaveContent = true; - + // The length is already set from the Content-Range header if (StartPos != 0) return true; @@ -184,7 +184,7 @@ bool ServerState::HeaderLine(string Line) HaveContent = true; return true; } - + if (stringcasecmp(Tag,"Content-Range:") == 0) { HaveContent = true; @@ -201,12 +201,12 @@ bool ServerState::HeaderLine(string Line) return _error->Error(_("This HTTP server has broken range support")); return true; } - + if (stringcasecmp(Tag,"Transfer-Encoding:") == 0) { HaveContent = true; if (stringcasecmp(Val,"chunked") == 0) - Encoding = Chunked; + Encoding = Chunked; return true; } @@ -218,7 +218,7 @@ bool ServerState::HeaderLine(string Line) Persistent = true; return true; } - + if (stringcasecmp(Tag,"Last-Modified:") == 0) { if (RFC1123StrToTime(Val.c_str(), Date) == false) @@ -413,7 +413,7 @@ bool ServerMethod::Fetch(FetchItem *) } return true; -}; +} /*}}}*/ // ServerMethod::Loop - Main loop /*{{{*/ int ServerMethod::Loop() diff --git a/methods/server.h b/methods/server.h index 2b81e6173..f1db9adf7 100644 --- a/methods/server.h +++ b/methods/server.h @@ -62,7 +62,7 @@ struct ServerState /** \brief IO error while retrieving */ RUN_HEADERS_IO_ERROR, /** \brief Parse error after retrieving */ - RUN_HEADERS_PARSE_ERROR, + RUN_HEADERS_PARSE_ERROR }; /** \brief Get the headers before the data */ RunHeadersResult RunHeaders(FileFd * const File); |