slackware-current/source/l/libieee1284/libieee1284-fix-warnings.patch
Patrick J Volkerding 821601d7cb Thu Mar 9 20:28:23 UTC 2023
a/openssl-solibs-3.0.8-x86_64-2.txz:  Rebuilt.
ap/dc3dd-7.3.0-x86_64-1.txz:  Upgraded.
ap/mariadb-10.11.2-x86_64-1.txz:  Upgraded.
d/cmake-3.25.3-x86_64-1.txz:  Upgraded.
l/imagemagick-7.1.1_1-x86_64-1.txz:  Upgraded.
l/libieee1284-0.2.11-x86_64-7.txz:  Rebuilt.
  Rebuilt for python3. Thanks to Heinz Wiesinger.
l/libplist-2.2.0-x86_64-4.txz:  Rebuilt.
  Rebuilt for python3. Thanks to Heinz Wiesinger.
l/pipewire-0.3.67-x86_64-1.txz:  Upgraded.
n/ModemManager-1.20.6-x86_64-1.txz:  Upgraded.
n/NetworkManager-1.42.4-x86_64-1.txz:  Upgraded.
n/openssl-3.0.8-x86_64-2.txz:  Rebuilt.
  Fixed man pages. Thanks to marav.
  Add example for enabling the legacy algorithms to /etc/ssl/openssl.cnf.
  Thanks to ctrlaltca.
n/openvpn-2.6.1-x86_64-1.txz:  Upgraded.
x/ibus-libpinyin-1.15.2-x86_64-1.txz:  Upgraded.
x/mesa-22.3.7-x86_64-1.txz:  Upgraded.
2023-03-09 22:34:46 +01:00

103 lines
3 KiB
Diff

From c48855528beee1397d883f9c8a5df7aed5c917a6 Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Wed, 23 Jun 2010 11:58:04 +0000
Subject: [PATCH] 2010-06-23 Tim Waugh <twaugh@redhat.com>
* src/ieee1284module.c: Fixed warnings.
---
src/ieee1284module.c | 37 ++++++++++++++++++++++++++++---------
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/src/ieee1284module.c b/src/ieee1284module.c
index 30972f8..0093d6f 100644
--- a/src/ieee1284module.c
+++ b/src/ieee1284module.c
@@ -28,6 +28,17 @@ typedef struct {
struct parport *port;
} ParportObject;
+static PyObject *
+Parport_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ ParportObject *self;
+ self = (ParportObject *) type->tp_alloc (type, 0);
+ if (self != NULL)
+ self->port = NULL;
+
+ return (PyObject *) self;
+}
+
static int
Parport_init (ParportObject *self, PyObject *args, PyObject *kwds)
{
@@ -215,7 +226,6 @@ Parport_release (ParportObject *self)
static PyObject *
Parport_read_data (ParportObject *self)
{
- unsigned char b[2];
int r = ieee1284_read_data (self->port);
if (r < 0) {
handle_error (r);
@@ -258,7 +268,6 @@ Parport_data_dir (ParportObject *self, PyObject *args)
static PyObject *
Parport_read_status (ParportObject *self)
{
- unsigned char b[2];
int r = ieee1284_read_status (self->port);
if (r < 0) {
handle_error (r);
@@ -293,7 +302,6 @@ Parport_wait_status (ParportObject *self, PyObject *args)
static PyObject *
Parport_read_control (ParportObject *self)
{
- unsigned char b[2];
int r = ieee1284_read_control (self->port);
if (r < 0) {
handle_error (r);
@@ -435,7 +443,6 @@ Parport_##x (ParportObject *self, PyObject *args) \
int len; \
char *buffer; \
ssize_t wrote; \
- PyObject *ret; \
\
if (!PyArg_ParseTuple (args, "s#|i", &buffer, &len, &flags)) \
return NULL; \
@@ -562,6 +569,23 @@ static PyTypeObject ParportType = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"parallel port object", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ Parport_methods, /* tp_methods */
+ 0, /* tp_members */
+ Parport_getseters, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Parport_init, /* tp_init */
+ 0, /* tp_alloc */
+ Parport_new, /* tp_new */
};
static PyObject *
@@ -625,14 +649,9 @@ initieee1284 (void)
PyObject *d = PyModule_GetDict (m);
PyObject *c;
- ParportType.tp_new = PyType_GenericNew;
- ParportType.tp_init = (initproc) Parport_init;
- ParportType.tp_getset = Parport_getseters;
- ParportType.tp_methods = Parport_methods;
if (PyType_Ready (&ParportType) < 0)
return;
- Py_INCREF (&ParportType);
PyModule_AddObject (m, "Parport", (PyObject *) &ParportType);
pyieee1284_error = PyErr_NewException("ieee1284.error", NULL, NULL);