Skip to content
Browse files

Remove compile warnings

Change-Id: Ib2f208340e20e3fef79707ac7a95e08efecf396c
Reviewed-on: http://review.couchbase.org/24772
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information...
1 parent 8487501 commit 8ce2b18a823801c96a209ceadacd4598120468c6 @trondn trondn committed Feb 21, 2013
Showing with 11 additions and 7 deletions.
  1. +11 −7 tests/http-tests.cc
View
18 tests/http-tests.cc
@@ -47,13 +47,18 @@ static void dumpResponse(const lcb_http_resp_t *resp)
if (resp->v.v0.headers) {
const char *const *hdr;
for (hdr = resp->v.v0.headers; *hdr; hdr++) {
- printf("Header: %s\n", *hdr);
+ std::cout << "Header: " << *hdr << std::endl;
}
}
if (resp->v.v0.bytes) {
- printf("%.*s\n", (int)resp->v.v0.nbytes, (const char *)resp->v.v0.bytes);
+ std::cout << "Data: " << std::endl;
+ std::cout.write((const char *)resp->v.v0.bytes, resp->v.v0.nbytes);
+ std::cout << std::endl;
}
- printf("%.*s\n", (int)resp->v.v0.npath, resp->v.v0.path);
+
+ std::cout << "Path: " << std::endl;
+ std::cout.write(resp->v.v0.path, resp->v.v0.npath);
+ std::cout << std::endl;
}
@@ -78,10 +83,9 @@ extern "C" {
if ((resp->v.v0.nbytes == 0 && htctx->dumpIfEmpty) ||
(error != LCB_SUCCESS && htctx->dumpIfError)) {
-
- printf("Count: %d\n", htctx->cbCount);
- printf("Code: %d\n", error);
- printf("nBytes: %d\n", resp->v.v0.nbytes);
+ std::cout << "Count: " << htctx->cbCount << std::endl
+ << "Code: " << error << std::endl
+ << "nBytes: " << resp->v.v0.nbytes << std::endl;
dumpResponse(resp);
}
}

0 comments on commit 8ce2b18

Please sign in to comment.
Something went wrong with that request. Please try again.