Skip to content

fix error support clang #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/dmidecodemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ xmlNode *__dmidecode_xml_getsection(options *opt, const char *section) {
if(opt->type == -1) {
char *err = log_retrieve(opt->logdata, LOG_ERR);
log_clear_partial(opt->logdata, LOG_ERR, 0);
_pyReturnError(PyExc_RuntimeError, "Invalid type id '%s' -- %s", typeid, err);
int typeid_int = atoi(typeid);
_pyReturnError(PyExc_RuntimeError, "Invalid type id '%d' -- %s", typeid_int, err);
free(err);
return NULL;
}
Expand Down Expand Up @@ -913,8 +914,7 @@ static PyMethodDef DMIDataMethods[] = {
{(char *)"pythonmap", dmidecode_set_pythonxmlmap, METH_O,
(char *) "Use another python dict map definition. The default file is " PYTHON_XML_MAP},

{(char *)"xmlapi", dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS,
(char *) "Internal API for retrieving data as raw XML data"},
{"xmlapi", (PyCFunction)dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS, "Internal API for retrieving data as raw XML data"},


{(char *)"get_warnings", dmidecode_get_warnings, METH_NOARGS,
Expand Down