File: player.c
Function: player_play
Error: comparison against uninitialized data (suit.3) at player.c:122
91 /* Let a player's AI play a card on the trick */
92 Card* player_play(Player *player)
93 {
94 	GList *l;
95 	gint suit, rank;
96 	PyObject *result;
97 
98 	/* If there's no AI loaded, quit */
99 	g_assert(player != NULL && player->ai != NULL);
when taking True path
when treating unknown struct Player * from player.c:92 as non-NULL
when treating unknown struct PyObject * from player.c:99 as non-NULL
taking True path
taking True path
100 	
101 	/* Publish globals to the AI */	
102 	game_score_publish();
103 	trick_publish(player->trick);
104 	player_publish_hand(player);
105 	
106 	/* Call play_card() */
107 	result = PyObject_CallMethod(player->ai, "play_card", "");
when PyObject_CallMethod() succeeds
108 	if (PyErr_Occurred())
PyErr_Occurred()
taking False path
109 	{
110 		PyErr_Print();
111 		g_assert_not_reached();
112 	}
113 	PyArg_ParseTuple(result, "ii", &suit, &rank);
when PyArg_ParseTuple() fails
114 	Py_DECREF(result);
when taking True path
115 	
116 	/* Find the card in the hand */
117 	Card *card_result = NULL;
118 
119 	for (l = player->hand->list; l; l = l->next)
when treating unknown struct CardsHand * from player.c:119 as non-NULL
when treating unknown struct GList * from player.c:119 as non-NULL
taking True path
120 	{
121 		Card *card = (Card*)l->data;
122 		if (card->suit == suit && card->rank == rank)
when treating unknown void * from player.c:121 as non-NULL
comparison against uninitialized data (suit.3) at player.c:122
found 1 similar trace(s) to this
123 			card_result = card;
124 	}
125 
126 	if (!card_result || !game_is_valid_card(card_result, player->hand, player->trick))
127 	{
128 		printf("trying to play invalid card %d,%d\n", suit, rank);
129 		g_assert_not_reached();
130 	}
131 	
132 	/* return the actual card */
133 	return card_result;
134 }

File: player.c
Function: player_play
Error: passing uninitialized data (suit.3) as argument 2 to function at player.c:128
91 /* Let a player's AI play a card on the trick */
92 Card* player_play(Player *player)
93 {
94 	GList *l;
95 	gint suit, rank;
96 	PyObject *result;
97 
98 	/* If there's no AI loaded, quit */
99 	g_assert(player != NULL && player->ai != NULL);
when taking True path
when treating unknown struct Player * from player.c:92 as non-NULL
when treating unknown struct PyObject * from player.c:99 as non-NULL
taking True path
taking True path
100 	
101 	/* Publish globals to the AI */	
102 	game_score_publish();
103 	trick_publish(player->trick);
104 	player_publish_hand(player);
105 	
106 	/* Call play_card() */
107 	result = PyObject_CallMethod(player->ai, "play_card", "");
when PyObject_CallMethod() succeeds
108 	if (PyErr_Occurred())
PyErr_Occurred()
taking False path
109 	{
110 		PyErr_Print();
111 		g_assert_not_reached();
112 	}
113 	PyArg_ParseTuple(result, "ii", &suit, &rank);
when PyArg_ParseTuple() fails
114 	Py_DECREF(result);
when taking True path
115 	
116 	/* Find the card in the hand */
117 	Card *card_result = NULL;
118 
119 	for (l = player->hand->list; l; l = l->next)
when treating unknown struct CardsHand * from player.c:119 as non-NULL
when treating unknown struct GList * from player.c:119 as NULL
taking False path
120 	{
121 		Card *card = (Card*)l->data;
122 		if (card->suit == suit && card->rank == rank)
123 			card_result = card;
124 	}
125 
126 	if (!card_result || !game_is_valid_card(card_result, player->hand, player->trick))
taking True path
127 	{
128 		printf("trying to play invalid card %d,%d\n", suit, rank);
passing uninitialized data (suit.3) as argument 2 to function at player.c:128
found 1 similar trace(s) to this
129 		g_assert_not_reached();
130 	}
131 	
132 	/* return the actual card */
133 	return card_result;
134 }