Commit a8408cfd authored by Will Thompson's avatar Will Thompson Committed by Tomeu Vizoso
Browse files

Fix a few set-but-not-used warnings.

In a couple of cases, the variable in question was set to a value
spelled out again later in the function.

The 'sequence_cache' variable is re-declared five lines below.

The return value of 'read' was previously completely ignored. The
'gssize ret' variable was in fact added to squash an unused-result
warning.

https://bugzilla.gnome.org/show_bug.cgi?id=668497
parent 29a30490
......@@ -477,7 +477,7 @@ py_io_channel_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
data->user_data = user_data; Py_XINCREF(user_data);
data->iochannel = self; Py_INCREF(self);
handler_id = g_io_add_watch_full(((PyGIOChannel *) self)->channel,
handler_id = g_io_add_watch_full(iochannel,
priority, condition,
pyg_iowatch_marshal, data,
(GDestroyNotify) pyg_iowatch_data_free);
......
......@@ -158,9 +158,8 @@ pyg_signal_watch_check(GSource *source)
PySignalWatchSource *real_source = (PySignalWatchSource *)source;
GPollFD *poll_fd = &real_source->fd;
unsigned char dummy;
gssize ret;
if (poll_fd->revents & G_IO_IN)
ret = read(poll_fd->fd, &dummy, 1);
(void) read(poll_fd->fd, &dummy, 1);
#endif
state = pyglib_gil_state_ensure();
......
......@@ -1275,7 +1275,7 @@ pygobject_get_properties(PyGObject *self, PyObject *args)
property_name = PYGLIB_PyUnicode_AsString(py_property);
pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
pspec = g_object_class_find_property(class,
property_name);
if (!pspec) {
PyErr_Format(PyExc_TypeError,
......
......@@ -356,8 +356,6 @@ _pygi_marshal_cleanup_to_py_array (PyGIInvokeState *state,
gpointer data,
gboolean was_processed)
{
PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
if (arg_cache->transfer == GI_TRANSFER_EVERYTHING ||
arg_cache->transfer == GI_TRANSFER_CONTAINER) {
GArray *array_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment