[API 0.379] rm warnings in example-reverse.c

This commit is contained in:
Willem Toorop 2014-01-22 10:53:17 +01:00
parent 0fe04964c3
commit dd0563c4ae
6 changed files with 8 additions and 6 deletions

View File

@ -14,9 +14,10 @@ void this_callbackfn(struct getdns_context *this_context,
void *this_userarg, void *this_userarg,
getdns_transaction_t this_transaction_id) getdns_transaction_t this_transaction_id)
{ {
getdns_return_t this_ret; /* Holder for all function returns */
UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */ UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */
UNUSED_PARAM(this_context); /* Not looking at the context for this example */ UNUSED_PARAM(this_context); /* Not looking at the context for this example */
getdns_return_t this_ret; /* Holder for all function returns */ UNUSED_PARAM(this_ret); /* Set, but not read */
if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */ if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */
{ {
/* Be sure the search returned something */ /* Be sure the search returned something */
@ -57,7 +58,7 @@ void this_callbackfn(struct getdns_context *this_context,
struct getdns_bindata * this_dname; struct getdns_bindata * this_dname;
this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname); this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname);
char *this_dname_str = getdns_convert_dns_name_to_fqdn(this_dname->data); char *this_dname_str = getdns_convert_dns_name_to_fqdn((char *)this_dname->data);
printf("The dname is %s\n", this_dname_str); printf("The dname is %s\n", this_dname_str);
free(this_dname_str); free(this_dname_str);

Binary file not shown.

BIN
spec/getdns-0.379.tgz Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
/* Created at 2014-01-22-10-02-56*/ /* Created at 2014-01-22-10-48-59*/
#ifndef GETDNS_H #ifndef GETDNS_H
#define GETDNS_H #define GETDNS_H

View File

@ -2210,7 +2210,7 @@ The response dicts inherit the custom memory management functions and the value
<h1>9. The Generated Files</h1> <h1>9. The Generated Files</h1>
<p>There is <a href="getdns-0.378.tgz">a tarball</a> that includes the .h files, <p>There is <a href="getdns-0.379.tgz">a tarball</a> that includes the .h files,
the examples, and so on. The examples all make, even though there is no API implementation, based the examples, and so on. The examples all make, even though there is no API implementation, based
on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine
on the Macintosh and Ubuntu; help is definitely appreciated on making the build process on the Macintosh and Ubuntu; help is definitely appreciated on making the build process

View File

@ -14,9 +14,10 @@ void this_callbackfn(struct getdns_context *this_context,
void *this_userarg, void *this_userarg,
getdns_transaction_t this_transaction_id) getdns_transaction_t this_transaction_id)
{ {
getdns_return_t this_ret; /* Holder for all function returns */
UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */ UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */
UNUSED_PARAM(this_context); /* Not looking at the context for this example */ UNUSED_PARAM(this_context); /* Not looking at the context for this example */
getdns_return_t this_ret; /* Holder for all function returns */ UNUSED_PARAM(this_ret); /* Set, but not read */
if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */ if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */
{ {
/* Be sure the search returned something */ /* Be sure the search returned something */
@ -57,7 +58,7 @@ void this_callbackfn(struct getdns_context *this_context,
struct getdns_bindata * this_dname; struct getdns_bindata * this_dname;
this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname); this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname);
char *this_dname_str = getdns_convert_dns_name_to_fqdn(this_dname->data); char *this_dname_str = getdns_convert_dns_name_to_fqdn((char *)this_dname->data);
printf("The dname is %s\n", this_dname_str); printf("The dname is %s\n", this_dname_str);
free(this_dname_str); free(this_dname_str);