未验证 提交 7e68c76d 编写于 作者: E Evgeny Proydakov 提交者: GitHub

Fixed compile warning for src/c_api.cpp nostring build. [-Wunused-parameter] (#2459)

上级 80cd5f3e
......@@ -188,6 +188,7 @@ const char* ncnn_blob_get_name(ncnn_blob_t blob)
#if NCNN_STRING
return ((Blob*)blob)->name.c_str();
#else
(void)blob;
return "";
#endif
}
......@@ -222,6 +223,7 @@ const char* ncnn_layer_get_name(ncnn_layer_t layer)
#if NCNN_STRING
return ((Layer*)layer)->name.c_str();
#else
(void)layer;
return "";
#endif
}
......@@ -236,6 +238,7 @@ const char* ncnn_layer_get_type(ncnn_layer_t layer)
#if NCNN_STRING
return ((Layer*)layer)->type.c_str();
#else
(void)layer;
return "";
#endif
}
......@@ -299,6 +302,8 @@ int ncnn_net_load_param(ncnn_net_t net, const char* path)
#if NCNN_STDIO && NCNN_STRING
return ((Net*)net)->load_param(path);
#else
(void)path;
(void)net;
return -1;
#endif
}
......@@ -308,6 +313,8 @@ int ncnn_net_load_model(ncnn_net_t net, const char* path)
#if NCNN_STDIO && NCNN_STRING
return ((Net*)net)->load_model(path);
#else
(void)path;
(void)net;
return -1;
#endif
}
......@@ -356,6 +363,9 @@ int ncnn_extractor_input(ncnn_extractor_t ex, const char* name, ncnn_mat_t mat)
#if NCNN_STRING
return ((Extractor*)ex)->input(name, *((Mat*)mat));
#else
(void)ex;
(void)name;
(void)mat;
return -1;
#endif
}
......@@ -368,6 +378,9 @@ int ncnn_extractor_extract(ncnn_extractor_t ex, const char* name, ncnn_mat_t* ma
*mat = (ncnn_mat_t)(new Mat(mat0));
return ret;
#else
(void)ex;
(void)name;
(void)mat;
return -1;
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册