Merge pull request #126 from vadz/warn-fix
Work around gcc warning about function pointers conversions.
This commit is contained in:
commit
0c1058511b
2 changed files with 3 additions and 3 deletions
|
|
@ -949,7 +949,7 @@ DOH *DohCall(DOH *func, DOH *args) {
|
||||||
DOH *result;
|
DOH *result;
|
||||||
DOH *(*builtin) (DOH *);
|
DOH *(*builtin) (DOH *);
|
||||||
|
|
||||||
builtin = (DOH *(*)(DOH *)) GetVoid(func, "builtin");
|
*(void **)(&builtin) = GetVoid(func, "builtin");
|
||||||
if (!builtin)
|
if (!builtin)
|
||||||
return 0;
|
return 0;
|
||||||
result = (*builtin) (args);
|
result = (*builtin) (args);
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ static int Writen(DOH *out, void *buffer, int len) {
|
||||||
void DohEncoding(const char *name, DOH *(*fn) (DOH *s)) {
|
void DohEncoding(const char *name, DOH *(*fn) (DOH *s)) {
|
||||||
if (!encodings)
|
if (!encodings)
|
||||||
encodings = NewHash();
|
encodings = NewHash();
|
||||||
Setattr(encodings, (void *) name, NewVoid((void *) fn, 0));
|
Setattr(encodings, (void *) name, NewVoid(*(void **)&fn, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* internal function for processing an encoding */
|
/* internal function for processing an encoding */
|
||||||
|
|
@ -72,7 +72,7 @@ static DOH *encode(char *name, DOH *s) {
|
||||||
s = tmp;
|
s = tmp;
|
||||||
pos = Tell(s);
|
pos = Tell(s);
|
||||||
Seek(s, 0, SEEK_SET);
|
Seek(s, 0, SEEK_SET);
|
||||||
fn = (DOH *(*)(DOH *)) Data(handle);
|
*(void **)(&fn) = Data(handle);
|
||||||
ns = (*fn) (s);
|
ns = (*fn) (s);
|
||||||
assert(pos != -1);
|
assert(pos != -1);
|
||||||
(void)Seek(s, pos, SEEK_SET);
|
(void)Seek(s, pos, SEEK_SET);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue