summaryrefslogtreecommitdiff
path: root/examples/gguf
diff options
context:
space:
mode:
authorCebtenzzre <cebtenzzre@gmail.com>2023-09-15 15:38:27 -0400
committerGitHub <noreply@github.com>2023-09-15 15:38:27 -0400
commit3aefaab9e59335ebb07d5205dbc8633efd680e58 (patch)
tree1249b50bd748a1bdcc85d010f44feda0d884fef7 /examples/gguf
parent69eb67e28275cd2d57693405f768754a7b2245ad (diff)
check C++ code with -Wmissing-declarations (#3184)
Diffstat (limited to 'examples/gguf')
-rw-r--r--examples/gguf/gguf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/gguf/gguf.cpp b/examples/gguf/gguf.cpp
index a34010f1..9ab63a29 100644
--- a/examples/gguf/gguf.cpp
+++ b/examples/gguf/gguf.cpp
@@ -13,14 +13,14 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
-template<typename T>
+template <typename T>
static std::string to_string(const T & val) {
std::stringstream ss;
ss << val;
return ss.str();
}
-bool gguf_ex_write(const std::string & fname) {
+static bool gguf_ex_write(const std::string & fname) {
struct gguf_context * ctx = gguf_init_empty();
gguf_set_val_u8 (ctx, "some.parameter.uint8", 0x12);
@@ -85,7 +85,7 @@ bool gguf_ex_write(const std::string & fname) {
}
// just read tensor info
-bool gguf_ex_read_0(const std::string & fname) {
+static bool gguf_ex_read_0(const std::string & fname) {
struct gguf_init_params params = {
/*.no_alloc = */ false,
/*.ctx = */ NULL,
@@ -143,7 +143,7 @@ bool gguf_ex_read_0(const std::string & fname) {
}
// read and create ggml_context containing the tensors and their data
-bool gguf_ex_read_1(const std::string & fname) {
+static bool gguf_ex_read_1(const std::string & fname) {
struct ggml_context * ctx_data = NULL;
struct gguf_init_params params = {