1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

fix: use std::string instead of plain C string to get rid of waring about strlen()

This commit is contained in:
Falk Werner 2019-02-15 16:18:02 +01:00
parent 95a0a4df59
commit 0279f1f7bd

View File

@ -1,15 +1,14 @@
#include <cstring>
#include <string>
#include <gtest/gtest.h>
#include "wsfs/jsonrpc/response.h"
static void wsfs_response_parse_str(
char const * buffer,
std::string const & buffer,
struct wsfs_jsonrpc_response * response)
{
size_t length = strlen(buffer);
wsfs_jsonrpc_response_init(response, buffer, length);
wsfs_jsonrpc_response_init(response, buffer.c_str(), buffer.size());
}
TEST(response_parser, test)