Skip to content
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

current master: typo in libdom/mapa.c #318

Open
balducci opened this issue Aug 25, 2024 · 1 comment
Open

current master: typo in libdom/mapa.c #318

balducci opened this issue Aug 25, 2024 · 1 comment

Comments

@balducci
Copy link

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

rkd77 added a commit that referenced this issue Aug 25, 2024
@rkd77
Copy link
Owner

rkd77 commented Aug 25, 2024

Thanks @balducci .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants