New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: silence unused var warning on FreeBSD #16452

Merged
merged 1 commit into from Jul 26, 2017

Conversation

Projects
None yet
2 participants
@wjwithagen
Contributor

wjwithagen commented Jul 20, 2017

  • And reorganize the include while there

Compiler Clang on FreeBSD complains:
/home/jenkins/workspace/ceph-master/src/common/buffer.cc:120:32: warning: unused variable 'buffer_max_pipe_size' [-Wunused-variable]
static std::atomic buffer_max_pipe_size { 0 };
^
1 warning generated.

Signed-off-by: Willem Jan Withagen wjw@digiware.nl

@wjwithagen wjwithagen changed the title from core: remove unsed var warning to core: remove unused var warning from buffer.cc Jul 20, 2017

@wjwithagen wjwithagen requested a review from tchaikov Jul 20, 2017

@tchaikov tchaikov removed the core label Jul 20, 2017

// this is the max size hardcoded in linux before 2.6.35
return 65536;
}
#else
int update_max_pipe_size() { return 0; }

This comment has been minimized.

@tchaikov

tchaikov Jul 21, 2017

Contributor

this function is only called if CEPH_HAVE_SETPIPE_SZ is defined. so no need to define it here.

// this is the max size hardcoded in linux before 2.6.35
return 65536;
}
#else
int update_max_pipe_size() { return 0; }
size_t get_max_pipe_size() { return 65536; }

This comment has been minimized.

@tchaikov

tchaikov Jul 21, 2017

Contributor

probably we can leave get_max_pipe_size as it is.

core: remove unsed var warning
 - And reorganize the include while there

Compiler Clang on FreeBSD complains:
/home/jenkins/workspace/ceph-master/src/common/buffer.cc:120:32: warning: unused variable 'buffer_max_pipe_size' [-Wunused-variable]
  static std::atomic<unsigned> buffer_max_pipe_size { 0 };
                               ^
1 warning generated.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@wjwithagen

This comment has been minimized.

Contributor

wjwithagen commented Jul 24, 2017

@tchaikov
I think your review was addressed.

@tchaikov tchaikov added the needs-qa label Jul 25, 2017

@tchaikov tchaikov changed the title from core: remove unused var warning from buffer.cc to buffer: silence unused var warning on FreeBSD Jul 25, 2017

@tchaikov tchaikov merged commit da4286e into ceph:master Jul 26, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@wjwithagen wjwithagen deleted the wjwithagen:wjw-warning-unused branch Feb 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment