diff options
author | rubidium <rubidium@openttd.org> | 2010-02-04 13:35:20 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-04 13:35:20 +0000 |
commit | 228da0ccd34d350ea6f721e67698e20c182c7cd5 (patch) | |
tree | bb570f376f933478d132737de38d4c6977e46534 | |
parent | 2b8f7f207844599174a1756411b65347fb2b9fa5 (diff) | |
download | openttd-228da0ccd34d350ea6f721e67698e20c182c7cd5.tar.xz |
(svn r19001) -Fix: some GCC compile warnings
-rw-r--r-- | src/network/core/tcp_http.h | 3 | ||||
-rw-r--r-- | src/network/network_content.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h index 6939577ad..13eeb7d54 100644 --- a/src/network/core/tcp_http.h +++ b/src/network/core/tcp_http.h @@ -33,6 +33,9 @@ struct HTTPCallback { * @note When NULL is sent the HTTP socket handler is closed/freed. */ virtual void OnReceiveData(const char *data, size_t length) = 0; + + /** Silentium */ + virtual ~HTTPCallback() {} }; /** Base socket handler for HTTP traffic. */ diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 1ffa2669f..f18381f05 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -553,9 +553,9 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l this->curInfo = new ContentInfo; /** Check p for not being null and return calling OnFailure if that's not the case. */ -#define check(p) { if ((p) == NULL) { this->OnFailure(); return; } } +#define check_not_null(p) { if ((p) == NULL) { this->OnFailure(); return; } } /** Check p for not being null and then terminate, or return calling OnFailure. */ -#define check_and_terminate(p) { check(p); *(p) = '\0'; } +#define check_and_terminate(p) { check_not_null(p); *(p) = '\0'; } for (;;) { char *str = this->http_response.Begin() + this->http_response_index; @@ -595,7 +595,7 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l } p = strrchr(str, '/'); - check(p); + check_not_null(p); char tmp[MAX_PATH]; if (strecpy(tmp, p, lastof(tmp)) == lastof(tmp)) { |