From 1dad647310d9ac7914aa8794d8df9d243705383a Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sun, 28 Mar 2021 18:36:12 +0200 Subject: [PATCH] fix(info): fix compilation warnings --- espanso-info/build.rs | 2 +- espanso-info/src/x11/native.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/espanso-info/build.rs b/espanso-info/build.rs index e08980f..6d3f7a5 100644 --- a/espanso-info/build.rs +++ b/espanso-info/build.rs @@ -40,7 +40,7 @@ fn cc_config() { println!("cargo:rerun-if-changed=src/x11/native.c"); cc::Build::new() .cpp(true) - .include("src/x11/native.h") + .include("src/x11") .file("src/x11/native.cpp") .compile("espansoinfo"); diff --git a/espanso-info/src/x11/native.cpp b/espanso-info/src/x11/native.cpp index a28cab6..12faaad 100644 --- a/espanso-info/src/x11/native.cpp +++ b/espanso-info/src/x11/native.cpp @@ -82,8 +82,8 @@ char *get_property(Display *disp, Window win, // Function taken from Window Management Library for Ruby char *xwm_get_win_title(Display *disp, Window win) { - char *wname = (char *)get_property(disp, win, XA_STRING, "WM_NAME", NULL); - char *nwname = (char *)get_property(disp, win, XInternAtom(disp, "UTF8_STRING", False), "_NET_WM_NAME", NULL); + char *wname = (char *)get_property(disp, win, XA_STRING, (char*)"WM_NAME", NULL); + char *nwname = (char *)get_property(disp, win, XInternAtom(disp, (char*)"UTF8_STRING", False), (char*)"_NET_WM_NAME", NULL); return nwname ? nwname : (wname ? wname : NULL); } @@ -143,7 +143,7 @@ int32_t info_get_exec(char *buffer, int32_t buffer_size) else { // Get the window process PID - char *pid_raw = (char *)get_property(display, focused, XA_CARDINAL, "_NET_WM_PID", NULL); + char *pid_raw = (char *)get_property(display, focused, XA_CARDINAL, (char*)"_NET_WM_PID", NULL); if (pid_raw == NULL) { result = -3;