1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/x11-servers/xorg-server/files/extra-clang
Niclas Zeising c17dedd527 Plug two more use before initialized with the new x server.
Noted by:	clang
Obtained from:	xorg development repo
2013-08-14 11:58:48 +00:00

99 lines
3.1 KiB
Plaintext

--- dix/events.c.orig 2012-07-09 02:32:59.000000000 +0200
+++ dix/events.c 2012-07-22 14:34:46.000000000 +0200
@@ -5189,7 +5189,8 @@
InitEvents(void)
{
int i;
- QdEventPtr qe, tmp;
+ QdEventPtr qe = NULL;
+ QdEventPtr tmp;
inputInfo.numDevices = 0;
inputInfo.devices = (DeviceIntPtr) NULL;
--- hw/xfree86/common/xf86Xinput.c.orig 2012-06-26 08:24:18.000000000 +0200
+++ hw/xfree86/common/xf86Xinput.c 2012-07-22 14:34:46.000000000 +0200
@@ -524,7 +524,7 @@
MatchAttrToken(const char *attr, struct xorg_list *patterns,
int (*compare) (const char *attr, const char *pattern))
{
- const xf86MatchGroup *group;
+ const xf86MatchGroup *group = NULL;
/* If there are no patterns, accept the match */
if (xorg_list_is_empty(patterns))
--- hw/xfree86/dri2/dri2.c.orig 2012-07-09 02:32:59.000000000 +0200
+++ hw/xfree86/dri2/dri2.c 2012-07-22 14:38:42.000000000 +0200
@@ -239,7 +239,7 @@
static DRI2DrawableRefPtr
DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id)
{
- DRI2DrawableRefPtr ref;
+ DRI2DrawableRefPtr ref = NULL;
xorg_list_for_each_entry(ref, &pPriv->reference_list, link) {
if (ref->id == id)
@@ -306,7 +306,8 @@
{
DRI2DrawablePtr pPriv = p;
DRI2ScreenPtr ds = pPriv->dri2_screen;
- DRI2DrawableRefPtr ref, next;
+ DRI2DrawableRefPtr ref = NULL;
+ DRI2DrawableRefPtr next;
WindowPtr pWin;
PixmapPtr pPixmap;
DrawablePtr pDraw;
@@ -587,7 +588,7 @@
DRI2InvalidateDrawable(DrawablePtr pDraw)
{
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
- DRI2DrawableRefPtr ref;
+ DRI2DrawableRefPtr ref = NULL;
if (!pPriv || !pPriv->needInvalidate)
return;
--- test/list.c.orig 2012-06-26 06:12:51.000000000 +0200
+++ test/list.c 2012-07-22 14:34:46.000000000 +0200
@@ -187,7 +187,7 @@
{
struct parent parent = { 0 };
struct child child[3];
- struct child *c;
+ struct child *c = NULL;
int i = 0;
xorg_list_init(&parent.children);
--- xfixes/cursor.c.orig 2012-07-06 07:17:19.000000000 +0200
+++ xfixes/cursor.c 2012-07-22 14:34:46.000000000 +0200
@@ -1143,7 +1143,7 @@
barrier_find_nearest(CursorScreenPtr cs, int dir,
int x1, int y1, int x2, int y2)
{
- struct PointerBarrierClient *c;
+ struct PointerBarrierClient *c = NULL;
struct PointerBarrier *nearest = NULL;
double min_distance = INT_MAX; /* can't get higher than that in X anyway */
--- hw/xfree86/parser/InputClass.c.orig 2013-07-04 11:45:42.139818164 +0200
+++ hw/xfree86/parser/InputClass.c 2013-07-04 11:46:29.034806839 +0200
@@ -362,7 +362,8 @@
XF86ConfInputClassPtr prev;
while (ptr) {
- xf86MatchGroup *group, *next;
+ xf86MatchGroup *group = NULL;
+ xf86MatchGroup *next;
char **list;
TestFree(ptr->identifier);
--- hw/xfree86/loader/loadmod.c.orig 2013-07-04 11:48:11.160800614 +0200
+++ hw/xfree86/loader/loadmod.c 2013-07-04 11:48:32.000800157 +0200
@@ -472,7 +472,7 @@
char **elem;
const char **subdirs;
const char **s;
- PatternPtr patterns;
+ PatternPtr patterns = NULL;
PatternPtr p;
DIR *d;
struct dirent *dp;