fix(clipboard): fix compilation warnings

This commit is contained in:
Federico Terzi 2021-03-28 18:36:36 +02:00
parent 1dad647310
commit d957fd35ce
2 changed files with 4 additions and 7 deletions

View File

@ -40,11 +40,8 @@ fn cc_config() {
println!("cargo:rerun-if-changed=src/x11/native/native.c");
cc::Build::new()
.cpp(true)
.include("src/x11/native/clip/clip.h")
.include("src/x11/native/clip/clip_common.h")
.include("src/x11/native/clip/clip_lock_impl.h")
.include("src/x11/native/clip/clip_x11_png.h")
.include("src/x11/native/native.h")
.include("src/x11/native/clip")
.include("src/x11/native")
.file("src/x11/native/clip/clip.cpp")
.file("src/x11/native/clip/clip_x11.cpp")
.file("src/x11/native/clip/image.cpp")

View File

@ -691,7 +691,7 @@ private:
// Calls the current m_callback() to handle the clipboard content
// received from the owner.
void call_callback(xcb_get_property_reply_t* reply) {
void call_callback(__attribute__((unused)) xcb_get_property_reply_t* reply) {
m_callback_result = false;
if (m_callback)
m_callback_result = m_callback();
@ -918,7 +918,7 @@ private:
return 0;
}
void encode_data_on_demand(std::pair<const xcb_atom_t, buffer_ptr>& e) {
void encode_data_on_demand(__attribute__((unused)) std::pair<const xcb_atom_t, buffer_ptr>& e) {
#ifdef HAVE_PNG_H
if (e.first == get_atom(MIME_IMAGE_PNG)) {
assert(m_image.is_valid());