Remove various unused variables
Clang and Gcc-4.9 complaint about some unused variables here and there. And who are we to not make a compiler happy :)
This commit is contained in:
parent
11974fa40a
commit
bd519dd952
8 changed files with 21 additions and 30 deletions
|
@ -55,7 +55,7 @@ FbRootWindow::FbRootWindow(int screen_num):
|
||||||
|
|
||||||
for (int i = 0; i < vinfo_nitems; i++) {
|
for (int i = 0; i < vinfo_nitems; i++) {
|
||||||
if ((DefaultDepth(disp, screen_num) < vinfo_return[i].depth)
|
if ((DefaultDepth(disp, screen_num) < vinfo_return[i].depth)
|
||||||
&& (depth() < vinfo_return[i].depth)){
|
&& (static_cast<int>(depth()) < vinfo_return[i].depth)){
|
||||||
m_visual = vinfo_return[i].visual;
|
m_visual = vinfo_return[i].visual;
|
||||||
setDepth(vinfo_return[i].depth);
|
setDepth(vinfo_return[i].depth);
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,7 +495,6 @@ long FbWindow::cardinalProperty(Atom prop,bool*exists) const {
|
||||||
Atom type;
|
Atom type;
|
||||||
int format;
|
int format;
|
||||||
unsigned long nitems, bytes_after;
|
unsigned long nitems, bytes_after;
|
||||||
int result;
|
|
||||||
long* num;
|
long* num;
|
||||||
long ret=0;
|
long ret=0;
|
||||||
if (exists) *exists=false;
|
if (exists) *exists=false;
|
||||||
|
|
|
@ -490,7 +490,6 @@ bool Keys::addBinding(const string &linebuffer) {
|
||||||
}
|
}
|
||||||
mod = 0;
|
mod = 0;
|
||||||
key = 0;
|
key = 0;
|
||||||
type = 0;
|
|
||||||
context = 0;
|
context = 0;
|
||||||
isdouble = false;
|
isdouble = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -453,12 +453,9 @@ int parseApp(ifstream &file, Application &app, string *first_line = 0) {
|
||||||
}
|
}
|
||||||
if (err > 0 ) {
|
if (err > 0 ) {
|
||||||
parse_pos += err;
|
parse_pos += err;
|
||||||
err = FbTk::StringUtil::getStringBetween(str_label,
|
FbTk::StringUtil::getStringBetween(str_label,
|
||||||
line.c_str() + parse_pos,
|
line.c_str() + parse_pos,
|
||||||
'{', '}');
|
'{', '}');
|
||||||
if (err>0) {
|
|
||||||
parse_pos += err;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
continue; //read next line
|
continue; //read next line
|
||||||
|
|
||||||
|
@ -1131,7 +1128,7 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) {
|
||||||
app = add(winclient);
|
app = add(winclient);
|
||||||
if (!app) return;
|
if (!app) return;
|
||||||
}
|
}
|
||||||
int head, head_x, head_y, win_w, win_h, percx, percy;
|
int head, percx, percy;
|
||||||
switch (attrib) {
|
switch (attrib) {
|
||||||
case REM_WORKSPACE:
|
case REM_WORKSPACE:
|
||||||
app->rememberWorkspace(win->workspaceNumber());
|
app->rememberWorkspace(win->workspaceNumber());
|
||||||
|
@ -1141,15 +1138,15 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) {
|
||||||
break;
|
break;
|
||||||
case REM_DIMENSIONS: {
|
case REM_DIMENSIONS: {
|
||||||
head = win->screen().getHead(win->fbWindow());
|
head = win->screen().getHead(win->fbWindow());
|
||||||
int percx = win->screen().calRelativeDimensionWidth(head, win->normalWidth());
|
percx = win->screen().calRelativeDimensionWidth(head, win->normalWidth());
|
||||||
int percy = win->screen().calRelativeDimensionHeight(head, win->normalHeight());
|
percy = win->screen().calRelativeDimensionHeight(head, win->normalHeight());
|
||||||
app->rememberDimensions(percx, percy, true);
|
app->rememberDimensions(percx, percy, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case REM_POSITION: {
|
case REM_POSITION: {
|
||||||
head = win->screen().getHead(win->fbWindow());
|
head = win->screen().getHead(win->fbWindow());
|
||||||
int percx = win->screen().calRelativePositionWidth(head, win->normalX());
|
percx = win->screen().calRelativePositionWidth(head, win->normalX());
|
||||||
int percy = win->screen().calRelativePositionHeight(head, win->normalY());
|
percy = win->screen().calRelativePositionHeight(head, win->normalY());
|
||||||
app->rememberPosition(percx, percy, true);
|
app->rememberPosition(percx, percy, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,10 +59,12 @@ bool RowSmartPlacement::placeWindow(const FluxboxWindow &win, int head,
|
||||||
bool left_right =
|
bool left_right =
|
||||||
screen_placement.rowDirection() == ScreenPlacement::LEFTRIGHT;
|
screen_placement.rowDirection() == ScreenPlacement::LEFTRIGHT;
|
||||||
|
|
||||||
int change_x = 1, change_y = 1;
|
int change_x = 1;
|
||||||
|
|
||||||
if (screen_placement.colDirection() == ScreenPlacement::BOTTOMTOP)
|
// unused code:
|
||||||
change_y = -1;
|
// int change_y = 1;
|
||||||
|
// if (screen_placement.colDirection() == ScreenPlacement::BOTTOMTOP)
|
||||||
|
// change_y = -1;
|
||||||
|
|
||||||
if (screen_placement.rowDirection() == ScreenPlacement::RIGHTLEFT)
|
if (screen_placement.rowDirection() == ScreenPlacement::RIGHTLEFT)
|
||||||
change_x = -1;
|
change_x = -1;
|
||||||
|
|
|
@ -75,18 +75,15 @@ public:
|
||||||
int actual_format;
|
int actual_format;
|
||||||
unsigned long nitems, bytes_after;
|
unsigned long nitems, bytes_after;
|
||||||
unsigned long *prop;
|
unsigned long *prop;
|
||||||
bool mapped = false;
|
|
||||||
Atom embed_info = SystemTray::getXEmbedInfoAtom();
|
Atom embed_info = SystemTray::getXEmbedInfoAtom();
|
||||||
if (property(embed_info, 0l, 2l, false, embed_info,
|
if (property(embed_info, 0l, 2l, false, embed_info,
|
||||||
&actual_type, &actual_format, &nitems, &bytes_after,
|
&actual_type, &actual_format, &nitems, &bytes_after,
|
||||||
(unsigned char **) &prop) && prop != 0) {
|
(unsigned char **) &prop) && prop != 0) {
|
||||||
mapped = (bool)(static_cast<unsigned long>(prop[1]) & XEMBED_MAPPED);
|
|
||||||
XFree(static_cast<void *>(prop));
|
XFree(static_cast<void *>(prop));
|
||||||
|
fbdbg << "(SystemTray::TrayWindow::getMappedDefault(): XEMBED_MAPPED = "
|
||||||
|
<< (bool)(static_cast<unsigned long>(prop[1]) & XEMBED_MAPPED)
|
||||||
fbdbg<<"(SystemTray::TrayWindow::getMappedDefault(): XEMBED_MAPPED = "<<mapped<<endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,12 +332,11 @@ FluxboxWindow::~FluxboxWindow() {
|
||||||
unregisterWindow(frame().window().window());
|
unregisterWindow(frame().window().window());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fbdbg << "starting ~FluxboxWindow(" << this << ","
|
||||||
const char* title = m_client ? m_client->title().logical().c_str() : "" ;
|
<< (m_client ? m_client->title().logical().c_str() : "") << ")" << endl
|
||||||
fbdbg<<"starting ~FluxboxWindow("<<this<<","<<title<<")"<<endl;
|
<< "num clients = " << numClients() << endl
|
||||||
fbdbg<<"num clients = "<<numClients()<<endl;
|
<< "curr client = "<< m_client << endl
|
||||||
fbdbg<<"curr client = "<<m_client<<endl;
|
<< "m_labelbuttons.size = " << m_labelbuttons.size() << endl;
|
||||||
fbdbg<<"m_labelbuttons.size = "<<m_labelbuttons.size()<<endl;
|
|
||||||
|
|
||||||
if (moving)
|
if (moving)
|
||||||
stopMoving(true);
|
stopMoving(true);
|
||||||
|
|
|
@ -43,7 +43,6 @@ int main(int argc, char **argv) {
|
||||||
int rc;
|
int rc;
|
||||||
Display* disp;
|
Display* disp;
|
||||||
Window root;
|
Window root;
|
||||||
Atom atom_utf8;
|
|
||||||
Atom atom_fbcmd;
|
Atom atom_fbcmd;
|
||||||
Atom atom_result;
|
Atom atom_result;
|
||||||
xerror_cb_t error_cb;
|
xerror_cb_t error_cb;
|
||||||
|
@ -62,7 +61,6 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = argv[1];
|
cmd = argv[1];
|
||||||
atom_utf8 = XInternAtom(disp, "UTF8_STRING", False);
|
|
||||||
atom_fbcmd = XInternAtom(disp, "_FLUXBOX_ACTION", False);
|
atom_fbcmd = XInternAtom(disp, "_FLUXBOX_ACTION", False);
|
||||||
atom_result = XInternAtom(disp, "_FLUXBOX_ACTION_RESULT", False);
|
atom_result = XInternAtom(disp, "_FLUXBOX_ACTION_RESULT", False);
|
||||||
root = DefaultRootWindow(disp);
|
root = DefaultRootWindow(disp);
|
||||||
|
|
Loading…
Reference in a new issue