elinks
elinks copied to clipboard
current master: typo in libdom/mapa.c
hello
building current master fails for me with:
../src/document/libdom/mapa.c: In function ‘find_in_map’:
../src/document/libdom/mapa.c:146:17: error: ‘return’ with no value, in function returning non-void [-Wreturn-mismatch]
146 | return;
| ^~~~~~
../src/document/libdom/mapa.c:141:1: note: declared here
141 | find_in_map(void *m, int offset)
| ^~~~~~~~~~~
(probably gcc-14 being less tolerant)
This fixes things:
*** mapa.c.ORIG Sun Aug 25 11:16:18 2024
--- mapa.c Sun Aug 25 11:16:25 2024
***************
*** 143,149 ****
struct el_mapa *mapa = (struct el_mapa *)m;
if (!mapa) {
! return;
}
struct el_node_elem key = { .offset = offset, .node = NULL };
struct el_node_elem *item = (struct el_node_elem *)bsearch(&key, mapa->table, mapa->size, sizeof(*item), compare);
--- 143,149 ----
struct el_mapa *mapa = (struct el_mapa *)m;
if (!mapa) {
! return NULL;
}
struct el_node_elem key = { .offset = offset, .node = NULL };
struct el_node_elem *item = (struct el_node_elem *)bsearch(&key, mapa->table, mapa->size, sizeof(*item), compare);
ciao -gabriele
Thanks @balducci .