Skip to content

Commit

Permalink
Fixed some clang compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MelindaShore committed Jan 25, 2016
1 parent e00b686 commit a51153f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions context.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ context_set_tls_authentication(getdns_context *context, PyObject *py_value)
return -1;
}
#if PY_MAJOR_VERSION >= 3
if ((value = (getdns_tls_authentication_t)PyLong_AsLong(py_value)) < 0) {
if ((int)(value = (getdns_tls_authentication_t)PyLong_AsLong(py_value)) < 0) {
#else
if ((value = (getdns_tls_authentication_t)PyInt_AsLong(py_value)) < 0) {
if ((int)(value = (getdns_tls_authentication_t)PyInt_AsLong(py_value)) < 0) {
#endif
PyErr_SetString(getdns_error, GETDNS_RETURN_INVALID_PARAMETER_TEXT);
return -1;
Expand Down Expand Up @@ -879,7 +879,7 @@ context_set_dns_transport_list(getdns_context *context, PyObject *py_value)
PyErr_SetString(getdns_error, GETDNS_RETURN_INVALID_PARAMETER_TEXT);
return -1;
}
transports[i] = transport;
transports[i] = (getdns_transport_list_t)transport;
}
else {
PyErr_SetString(getdns_error, GETDNS_RETURN_INVALID_PARAMETER_TEXT);
Expand Down

0 comments on commit a51153f

Please sign in to comment.