1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

Merge of compiler warning fixes from HEAD.

This commit is contained in:
Tim Potter -
parent 537cd78268
commit 80e61a7546
2 changed files with 6 additions and 5 deletions

View File

@ -42,12 +42,12 @@ PyObject *from_struct(void *s, struct pyconv *conv)
switch (conv[i].type) {
case PY_UNISTR: {
UNISTR *u = (UNISTR *)((char *)s + conv[i].offset);
fstring s = "";
fstring str = "";
if (u->buffer)
fstr_pull(s, u);
item = PyString_FromString(s);
item = PyString_FromString(str);
PyDict_SetItemString(obj, conv[i].name, item);
break;
@ -122,13 +122,13 @@ BOOL to_struct(void *s, PyObject *dict, struct pyconv *conv)
switch (conv[i].type) {
case PY_UNISTR: {
UNISTR *u = (UNISTR *)((char *)s + conv[i].offset);
char *s = "";
char *str = "";
if (!PyString_Check(obj))
goto done;
s = PyString_AsString(obj);
init_unistr(u, s);
str = PyString_AsString(obj);
init_unistr(u, str);
break;
}

View File

@ -31,6 +31,7 @@ struct pyconv {
PyObject *from_struct(void *s, struct pyconv *conv);
BOOL to_struct(void *s, PyObject *dict, struct pyconv *conv);
PyObject *from_unistr_list(uint16 *dependentfiles);
/* Another version of offsetof (-: */