Skip to content

Commit

Permalink
Eliminated compiler warnings
Browse files Browse the repository at this point in the history
The outstanding compiler warnings were eliminated when building the 'sip'
module.

Resolves #32
  • Loading branch information
philthompson10 committed Dec 5, 2024
1 parent 47540b4 commit b55a63c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
12 changes: 3 additions & 9 deletions sipbuild/module/source/12/siplib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2893,7 +2893,7 @@ static int parseResult(PyObject *method, PyObject *res,
case 'a':
{
char *p = va_arg(va, char *);
int enc;
int enc = -1;

switch (*fmt++)
{
Expand All @@ -2908,9 +2908,6 @@ static int parseResult(PyObject *method, PyObject *res,
case '8':
enc = parseString_AsUTF8Char(arg, p);
break;

default:
enc = -1;
}

if (enc < 0)
Expand Down Expand Up @@ -3181,7 +3178,7 @@ static int parseResult(PyObject *method, PyObject *res,
{
int key = va_arg(va, int);
const char **p = va_arg(va, const char **);
PyObject *keep;
PyObject *keep = NULL;

switch (*fmt++)
{
Expand All @@ -3196,9 +3193,6 @@ static int parseResult(PyObject *method, PyObject *res,
case '8':
keep = parseString_AsUTF8String(arg, p);
break;

default:
keep = NULL;
}

if (keep == NULL)
Expand Down Expand Up @@ -5785,7 +5779,7 @@ static int parsePass2(sipSimpleWrapper *self, int selfarg, PyObject *sipArgs,

if (arg != NULL)
{
int enc;
int enc = -1;

switch (sub_fmt)
{
Expand Down
12 changes: 3 additions & 9 deletions sipbuild/module/source/13/sip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,7 @@ static int parseResult(PyObject *method, PyObject *res,
case 'a':
{
char *p = va_arg(va, char *);
int enc;
int enc = -1;

switch (*fmt++)
{
Expand All @@ -2604,9 +2604,6 @@ static int parseResult(PyObject *method, PyObject *res,
case '8':
enc = parseString_AsUTF8Char(arg, p);
break;

default:
enc = -1;
}

if (enc < 0)
Expand Down Expand Up @@ -2843,7 +2840,7 @@ static int parseResult(PyObject *method, PyObject *res,
{
int key = va_arg(va, int);
const char **p = va_arg(va, const char **);
PyObject *keep;
PyObject *keep = NULL;

switch (*fmt++)
{
Expand All @@ -2858,9 +2855,6 @@ static int parseResult(PyObject *method, PyObject *res,
case '8':
keep = parseString_AsUTF8String(arg, p);
break;

default:
keep = NULL;
}

if (keep == NULL)
Expand Down Expand Up @@ -5066,7 +5060,7 @@ static int parsePass2(PyObject *self, int selfarg, PyObject *sipArgs,

if (arg != NULL)
{
int enc;
int enc = -1;

switch (sub_fmt)
{
Expand Down

0 comments on commit b55a63c

Please sign in to comment.