Skip to content

Commit bc24712

Browse files
authored
Fixed compile warnings for gcc linux build. [-Wunused-parameter] [-Wunused-but-set-variable] (#2198)
1 parent 9be3f07 commit bc24712

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/c_api.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ int ncnn_option_get_use_vulkan_compute(ncnn_option_t opt)
163163
#if NCNN_VULKAN
164164
return ((Option*)opt)->use_vulkan_compute;
165165
#else
166+
(void)opt;
166167
return 0;
167168
#endif
168169
}

src/layer/interp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,13 @@ int Interp::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) co
408408
{
409409
int w = bottom_blob.w;
410410
int h = bottom_blob.h;
411-
int channels = bottom_blob.c;
412411

413412
int outh = output_height;
414413
int outw = output_width;
415414
if (bottom_blob.dims == 1)
416415
{
417416
h = 1;
418417
w = 1;
419-
channels = bottom_blob.w;
420418
}
421419
if (outh == 0 || outw == 0)
422420
{

0 commit comments

Comments
 (0)