get rid of some warnings

This commit is contained in:
vaxerski 2021-12-23 10:27:41 +01:00
parent 7d045957ef
commit 3757772264
5 changed files with 5 additions and 16 deletions

View file

@ -31,7 +31,7 @@ struct SBarModule {
uint64_t updateEveryMs; uint64_t updateEveryMs;
std::chrono::system_clock::time_point updateLast; std::chrono::system_clock::time_point updateLast;
xcb_gcontext_t bgcontext = NULL; // deprecated xcb_gcontext_t bgcontext = 0; // deprecated
// PADS // PADS
bool isPad = false; bool isPad = false;

View file

@ -134,13 +134,13 @@ std::string BarCommands::parseCommand(std::string command) {
std::string result = ""; std::string result = "";
for (int i = 0; i < command.length(); ++i) { for (long unsigned int i = 0; i < command.length(); ++i) {
const auto c = command[i]; const auto c = command[i];
if (c == '%') { if (c == '%') {
// find the next one // find the next one
for (int j = i + 1; i < command.length(); ++j) { for (long unsigned int j = i + 1; i < command.length(); ++j) {
if (command[j] == '%') { if (command[j] == '%') {
// found! // found!
auto toSend = command.substr(i + 1); auto toSend = command.substr(i + 1);
@ -157,7 +157,7 @@ std::string BarCommands::parseCommand(std::string command) {
else if (c == '$') { else if (c == '$') {
// find the next one // find the next one
for (int j = i + 1; i < command.length(); ++j) { for (long unsigned int j = i + 1; i < command.length(); ++j) {
if (command[j] == '$') { if (command[j] == '$') {
// found! // found!
auto toSend = command.substr(i + 1); auto toSend = command.substr(i + 1);

View file

@ -14,11 +14,6 @@ class Vector2D {
// returns the scale // returns the scale
double normalize(); double normalize();
Vector2D& operator=(Vector2D a) {
this->x = a.x; this->y = a.y;
return *this;
}
Vector2D operator+(Vector2D a) { Vector2D operator+(Vector2D a) {
return Vector2D(this->x + a.x, this->y + a.y); return Vector2D(this->x + a.x, this->y + a.y);
} }

View file

@ -36,7 +36,7 @@ void IPCSendMessage(const std::string path, SIPCMessageBarToMain smessage) {
std::string message = ""; std::string message = "";
// write the WID // write the WID
message += "wid" + IPC_MESSAGE_EQUALITY + std::to_string(g_pWindowManager->statusBar->getWindowID()) + IPC_MESSAGE_SEPARATOR; message += "wid" + IPC_MESSAGE_EQUALITY + std::to_string(smessage.windowID) + IPC_MESSAGE_SEPARATOR;
// append the EOF // append the EOF
message += IPC_END_OF_FILE; message += IPC_END_OF_FILE;

View file

@ -470,7 +470,6 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
PLASTWIN->setEffectiveBorderColor(CFloatingColor(ConfigManager::getInt("col.active_border"))); PLASTWIN->setEffectiveBorderColor(CFloatingColor(ConfigManager::getInt("col.active_border")));
} }
float values[1];
if (const auto PWINDOW = g_pWindowManager->getWindowFromDrawable(window); PWINDOW) { if (const auto PWINDOW = g_pWindowManager->getWindowFromDrawable(window); PWINDOW) {
// Apply rounded corners, does all the checks inside. // Apply rounded corners, does all the checks inside.
// The border changed so let's not make it rectangular maybe // The border changed so let's not make it rectangular maybe
@ -719,8 +718,6 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) {
if (!pWindow || pWindow->getIsFloating()) if (!pWindow || pWindow->getIsFloating())
return; return;
auto START = std::chrono::high_resolution_clock::now();
const auto MONITOR = getMonitorFromWindow(pWindow); const auto MONITOR = getMonitorFromWindow(pWindow);
const auto BARHEIGHT = (MONITOR->ID == ConfigManager::getInt("bar:monitor") ? (ConfigManager::getInt("bar:enabled") == 1 ? ConfigManager::getInt("bar:height") : ConfigManager::parseError == "" ? 0 : ConfigManager::getInt("bar:height")) : 0); const auto BARHEIGHT = (MONITOR->ID == ConfigManager::getInt("bar:monitor") ? (ConfigManager::getInt("bar:enabled") == 1 ? ConfigManager::getInt("bar:height") : ConfigManager::parseError == "" ? 0 : ConfigManager::getInt("bar:height")) : 0);
@ -752,8 +749,6 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) {
} }
CWindow* CWindowManager::findWindowAtCursor() { CWindow* CWindowManager::findWindowAtCursor() {
const auto POINTERCOOKIE = xcb_query_pointer(DisplayConnection, Screen->root);
Vector2D cursorPos = getCursorPos(); Vector2D cursorPos = getCursorPos();
const auto WORKSPACE = activeWorkspaces[getMonitorFromCursor()->ID]; const auto WORKSPACE = activeWorkspaces[getMonitorFromCursor()->ID];
@ -1648,7 +1643,6 @@ bool CWindowManager::shouldBeFloatedOnInit(int64_t window) {
// Type stuff // Type stuff
// //
PROP(wm_type_cookie, HYPRATOMS["_NET_WM_WINDOW_TYPE"], UINT32_MAX); PROP(wm_type_cookie, HYPRATOMS["_NET_WM_WINDOW_TYPE"], UINT32_MAX);
xcb_atom_t TYPEATOM = NULL;
if (wm_type_cookiereply == NULL || xcb_get_property_value_length(wm_type_cookiereply) < 1) { if (wm_type_cookiereply == NULL || xcb_get_property_value_length(wm_type_cookiereply) < 1) {
Debug::log(LOG, "No preferred type found. (shouldBeFloatedOnInit)"); Debug::log(LOG, "No preferred type found. (shouldBeFloatedOnInit)");