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