aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authormarkt <markt>2006-08-08 19:25:48 (GMT)
committermarkt <markt>2006-08-08 19:25:48 (GMT)
commit9b9d5a9617612928710570e024632ba62f0ff74f (patch)
tree187697534c1eee0ce1c4ce73574bc277e61b9b06 /src/Window.cc
parente2c31b7285f4bba232547bb61f97abf29fdca34e (diff)
downloadfluxbox-9b9d5a9617612928710570e024632ba62f0ff74f.zip
fluxbox-9b9d5a9617612928710570e024632ba62f0ff74f.tar.bz2
fix some compiler warnings in gcc 4.1
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 5aebad4..43d0517 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2207,11 +2207,12 @@ bool FluxboxWindow::getState() {
2207 Atom atom_return; 2207 Atom atom_return;
2208 bool ret = false; 2208 bool ret = false;
2209 int foo; 2209 int foo;
2210 unsigned long *state, ulfoo, nitems; 2210 unsigned char *state;
2211 unsigned long ulfoo, nitems;
2211 if (!m_client->property(FbAtoms::instance()->getWMStateAtom(), 2212 if (!m_client->property(FbAtoms::instance()->getWMStateAtom(),
2212 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(), 2213 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(),
2213 &atom_return, &foo, &nitems, &ulfoo, 2214 &atom_return, &foo, &nitems, &ulfoo,
2214 (unsigned char **) &state) || !state) 2215 &state) || !state)
2215 return false; 2216 return false;
2216 2217
2217 if (nitems >= 1) { 2218 if (nitems >= 1) {
@@ -2239,18 +2240,20 @@ void FluxboxWindow::restoreAttributes() {
2239 Atom atom_return; 2240 Atom atom_return;
2240 int foo; 2241 int foo;
2241 unsigned long ulfoo, nitems; 2242 unsigned long ulfoo, nitems;
2243 unsigned char *data;
2242 FbAtoms *fbatoms = FbAtoms::instance(); 2244 FbAtoms *fbatoms = FbAtoms::instance();
2243 2245
2244 BlackboxAttributes *net; 2246 BlackboxAttributes *net;
2245 if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l, 2247 if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l,
2246 PropBlackboxAttributesElements, false, 2248 PropBlackboxAttributesElements, false,
2247 fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo, 2249 fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo,
2248 &nitems, &ulfoo, (unsigned char **) &net) && 2250 &nitems, &ulfoo, &data) &&
2249 net) { 2251 data) {
2250 if (nitems != (unsigned)PropBlackboxAttributesElements) { 2252 if (nitems != (unsigned)PropBlackboxAttributesElements) {
2251 XFree(net); 2253 XFree(data);
2252 return; 2254 return;
2253 } 2255 }
2256 net = (BlackboxAttributes *) data;
2254 m_blackbox_attrib.flags = net->flags; 2257 m_blackbox_attrib.flags = net->flags;
2255 m_blackbox_attrib.attrib = net->attrib; 2258 m_blackbox_attrib.attrib = net->attrib;
2256 m_blackbox_attrib.workspace = net->workspace; 2259 m_blackbox_attrib.workspace = net->workspace;
@@ -2260,7 +2263,7 @@ void FluxboxWindow::restoreAttributes() {
2260 m_blackbox_attrib.premax_w = net->premax_w; 2263 m_blackbox_attrib.premax_w = net->premax_w;
2261 m_blackbox_attrib.premax_h = net->premax_h; 2264 m_blackbox_attrib.premax_h = net->premax_h;
2262 2265
2263 XFree(static_cast<void *>(net)); 2266 XFree(data);
2264 } else 2267 } else
2265 return; 2268 return;
2266 2269