aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/Makefile1
-rw-r--r--xorg-server/Xext/hashtable.c15
-rw-r--r--xorg-server/Xext/xres.c6
-rw-r--r--xorg-server/dix/resource.c60
4 files changed, 43 insertions, 39 deletions
diff --git a/xorg-server/Xext/Makefile b/xorg-server/Xext/Makefile
index 60907a1b3..d59f345d0 100644
--- a/xorg-server/Xext/Makefile
+++ b/xorg-server/Xext/Makefile
@@ -9,6 +9,7 @@ sleepuntil.c \
sync.c \
xace.c \
xcmisc.c \
+hashtable.c \
xres.c \
xtest.c \
geext.c \
diff --git a/xorg-server/Xext/hashtable.c b/xorg-server/Xext/hashtable.c
index 2adf92e56..5cfaeb863 100644
--- a/xorg-server/Xext/hashtable.c
+++ b/xorg-server/Xext/hashtable.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
#include <stdlib.h>
#include "misc.h"
#include "hashtable.h"
@@ -68,7 +71,7 @@ void
ht_destroy(HashTable ht)
{
int c;
- BucketPtr it, tmp;
+ BucketPtr it=NULL, tmp;
int numBuckets = 1 << ht->bucketBits;
for (c = 0; c < numBuckets; ++c) {
xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) {
@@ -95,7 +98,7 @@ double_size(HashTable ht)
}
for (c = 0; c < numBuckets; ++c) {
- BucketPtr it, tmp;
+ BucketPtr it=NULL, tmp;
xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) {
struct xorg_list *newBucket =
&newBuckets[ht->hash(ht->cdata, it->key, newBucketBits)];
@@ -164,7 +167,7 @@ ht_remove(HashTable ht, pointer key)
{
unsigned index = ht->hash(ht->cdata, key, ht->bucketBits);
struct xorg_list *bucket = &ht->buckets[index];
- BucketPtr it;
+ BucketPtr it=NULL;
xorg_list_for_each_entry(it, bucket, l) {
if (ht->compare(ht->cdata, key, it->key) == 0) {
@@ -183,7 +186,7 @@ ht_find(HashTable ht, pointer key)
{
unsigned index = ht->hash(ht->cdata, key, ht->bucketBits);
struct xorg_list *bucket = &ht->buckets[index];
- BucketPtr it;
+ BucketPtr it=NULL;
xorg_list_for_each_entry(it, bucket, l) {
if (ht->compare(ht->cdata, key, it->key) == 0) {
@@ -200,7 +203,7 @@ ht_dump_distribution(HashTable ht)
int c;
int numBuckets = 1 << ht->bucketBits;
for (c = 0; c < numBuckets; ++c) {
- BucketPtr it;
+ BucketPtr it=NULL;
int n = 0;
xorg_list_for_each_entry(it, &ht->buckets[c], l) {
@@ -273,7 +276,7 @@ ht_dump_contents(HashTable ht,
int c;
int numBuckets = 1 << ht->bucketBits;
for (c = 0; c < numBuckets; ++c) {
- BucketPtr it;
+ BucketPtr it=NULL;
int n = 0;
printf("%d: ", c);
diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c
index ecef0c032..7b2e609bd 100644
--- a/xorg-server/Xext/xres.c
+++ b/xorg-server/Xext/xres.c
@@ -117,7 +117,7 @@ AddFragment(struct xorg_list *frags, int bytes)
static void
WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
{
- FragmentList *it;
+ FragmentList *it=NULL;
xorg_list_for_each_entry(it, frags, l) {
WriteToClient(client, it->bytes, (char*) it + sizeof(*it));
}
@@ -130,7 +130,7 @@ WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
static void
DestroyFragments(struct xorg_list *frags)
{
- FragmentList *it, *tmp;
+ FragmentList *it=NULL, *tmp;
xorg_list_for_each_entry_safe(it, tmp, frags, l) {
xorg_list_del(&it->l);
free(it);
@@ -818,7 +818,7 @@ AddResourceSizeValue(pointer ptr, XID id, RESTYPE type, pointer cdata)
Bool ok = TRUE;
HashTable ht;
HtGenericHashSetupRec htSetup = {
- .keySize = sizeof(void*)
+ /*.keySize = */sizeof(void*)
};
/* it doesn't matter that we don't undo the work done here
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index 1ab06d51d..c04b5578e 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -432,65 +432,65 @@ FindGCSubRes(pointer value, FindAllRes func, pointer cdata)
static struct ResourceType *resourceTypes;
static const struct ResourceType predefTypes[] = {
- /* [RT_NONE & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */(DeleteType)NoopDDA,
+ /* [RT_NONE & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */(DeleteType)NoopDDA,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadValue,
+ /*.errorValue = */BadValue,
},
- /* [RT_WINDOW & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */DeleteWindow,
+ /* [RT_WINDOW & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */DeleteWindow,
/*.sizeFunc = */GetWindowBytes,
/*.findSubResFunc = */FindWindowSubRes,
- /*.errorValue = */BadWindow,
+ /*.errorValue = */BadWindow,
},
- /* [RT_PIXMAP & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */dixDestroyPixmap,
+ /* [RT_PIXMAP & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */dixDestroyPixmap,
/*.sizeFunc = */GetPixmapBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadPixmap,
+ /*.errorValue = */BadPixmap,
},
- /* [RT_GC & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */FreeGC,
+ /* [RT_GC & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeGC,
/*.sizeFunc = */GetGcBytes,
/*.findSubResFunc = */FindGCSubRes,
- /*.errorValue = */BadGC,
+ /*.errorValue = */BadGC,
},
- /* [RT_FONT & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */CloseFont,
+ /* [RT_FONT & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */CloseFont,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadFont,
+ /*.errorValue = */BadFont,
},
- /* [RT_CURSOR & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */FreeCursor,
+ /* [RT_CURSOR & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeCursor,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadCursor,
+ /*.errorValue = */BadCursor,
},
- /* [RT_COLORMAP & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */FreeColormap,
+ /* [RT_COLORMAP & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeColormap,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadColor,
+ /*.errorValue = */BadColor,
},
- /* [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */FreeClientPixels,
+ /* [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeClientPixels,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadColor,
+ /*.errorValue = */BadColor,
},
- /* [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */OtherClientGone,
+ /* [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */OtherClientGone,
/*.sizeFunc = */GetDefaultBytes,
/*.findSubResFunc = */DefaultFindSubRes,
- /*.errorValue = */BadValue,
+ /*.errorValue = */BadValue,
},
- /* [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = */ {
- /*.deleteFunc = */DeletePassiveGrab,
+ /* [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = */ {
/*.deleteFunc = */DeletePassiveGrab,
/*.sizeFunc = */GetDefaultBytes,
- /*.errorValue = */BadValue,
+ /*.findSubResFunc = */DefaultFindSubRes,
+ /*.errorValue = */BadValue,
},
};