summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-02-05 00:18:32 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-02-05 00:18:32 +0800
commitda75fba9478b5fd7461ae31500f95bb21227c412 (patch)
tree29f79b493fe057c2ae49e56e296ac6aa3f5a3833 /src
parent55d8c5b16aed34a04b3405e0a63575b9002612b2 (diff)
downloadzcomp-da75fba9478b5fd7461ae31500f95bb21227c412.tar.gz
zcomp-da75fba9478b5fd7461ae31500f95bb21227c412.tar.bz2
Fix typo and fix more warnings
Diffstat (limited to 'src')
-rw-r--r--src/event.cpp3
-rw-r--r--src/screen.cpp10
-rw-r--r--src/window.cpp11
3 files changed, 14 insertions, 10 deletions
diff --git a/src/event.cpp b/src/event.cpp
index 5039dd5..71f1675 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -323,7 +323,8 @@ PrivateScreen::triggerKeyReleaseBindings (CompOption::Vector &options,
if ((bindMods & modMask) == 0)
{
- if (action->key ().keycode () == (unsigned int) event->keycode)
+ if ((unsigned int) action->key ().keycode () ==
+ (unsigned int) event->keycode)
{
if (action->terminate () (action, state, arguments))
return true;
diff --git a/src/screen.cpp b/src/screen.cpp
index d9d2731..cb40573 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -2273,10 +2273,12 @@ PrivateScreen::getDesktopHints ()
{
memcpy (data, propData, sizeof (unsigned long) * 2);
- if (data[0] / screen->width () < vpSize.width () - 1)
+ if (data[0] / (unsigned int) screen->width () <
+ (unsigned int) vpSize.width () - 1)
vp.setX (data[0] / screen->width ());
- if (data[1] / screen->height () < vpSize.height () - 1)
+ if (data[1] / (unsigned int) screen->height () <
+ (unsigned int) vpSize.height () - 1)
vp.setY (data[1] / screen->height ());
}
@@ -3203,7 +3205,7 @@ PrivateScreen::updateClientList ()
if (n == 0)
{
- if (n != priv->clientList.size ())
+ if ((unsigned int) n != priv->clientList.size ())
{
priv->clientList.clear ();
priv->clientListStacking.clear ();
@@ -3223,7 +3225,7 @@ PrivateScreen::updateClientList ()
return;
}
- if (n != priv->clientList.size ())
+ if ((unsigned int) n != priv->clientList.size ())
{
priv->clientIdList.resize (n);
priv->clientIdListStacking.resize (n);
diff --git a/src/window.cpp b/src/window.cpp
index 0c0cfff..6beb475 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3929,7 +3929,8 @@ PrivateWindow::readIconHint ()
XImage *image, *maskImage = NULL;
Display *dpy = screen->dpy ();
unsigned int width, height, dummy;
- int i, j, k, iDummy;
+ unsigned int i, j, k;
+ int iDummy;
Window wDummy;
CompIcon *icon;
XColor *colors;
@@ -3952,8 +3953,8 @@ PrivateWindow::readIconHint ()
}
k = 0;
- for ((unsigned int) j = 0; j < height; j++)
- for ((unsigned int) i = 0; i < width; i++)
+ for (j = 0; j < height; j++)
+ for (i = 0; i < width; i++)
colors[k++].pixel = XGetPixel (image, i, j);
for (i = 0; i < k; i += 256)
@@ -3976,9 +3977,9 @@ PrivateWindow::readIconHint ()
k = 0;
p = (CARD32 *) icon->data ();
- for ((unsigned int) j = 0; j < height; j++)
+ for (j = 0; j < height; j++)
{
- for ((unsigned int) i = 0; i < width; i++)
+ for (i = 0; i < width; i++)
{
if (maskImage && !XGetPixel (maskImage, i, j))
*p++ = 0;