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

compile warnings in src/c-libedit #24

Open
RaduBerinde opened this issue Mar 4, 2023 · 2 comments
Open

compile warnings in src/c-libedit #24

RaduBerinde opened this issue Mar 4, 2023 · 2 comments

Comments

@RaduBerinde
Copy link

The warnings below show up during the lint tests in CockroachDB, distracting from the actual error messages. Could we modify the source to fix them? Adding some casts might fix them.

INFO: From Compiling unix/src/c-libedit/search.c:
external/com_github_knz_go_libedit/unix/src/c-libedit/search.c: In function 'cv_csearch':
external/com_github_knz_go_libedit/unix/src/c-libedit/search.c:607:20: warning: pointer targets in passing argument 2 of 'el_wgetc' differ in signedness [-Wpointer-sign]
  607 |   if (el_wgetc(el, &ch) != 1)
      |                    ^~~
      |                    |
      |                    wint_t * {aka unsigned int *}
In file included from external/com_github_knz_go_libedit/unix/src/c-libedit/el.h:49,
                 from external/com_github_knz_go_libedit/unix/src/c-libedit/search.c:56:
external/com_github_knz_go_libedit/unix/src/c-libedit/histedit.h:267:28: note: expected 'wchar_t *' {aka 'int *'} but argument is of type 'wint_t *' {aka 'unsigned int *'}
  267 | int   el_wgetc(EditLine *, wchar_t *);
      |                            ^~~~~~~~~
INFO: From Compiling unix/src/c-libedit/common.c:
external/com_github_knz_go_libedit/unix/src/c-libedit/common.c: In function 'ed_quoted_insert':
external/com_github_knz_go_libedit/unix/src/c-libedit/common.c:371:21: warning: pointer targets in passing argument 2 of 'el_wgetc' differ in signedness [-Wpointer-sign]
  371 |  num = el_wgetc(el, &c);
      |                     ^~
      |                     |
      |                     wint_t * {aka unsigned int *}
In file included from external/com_github_knz_go_libedit/unix/src/c-libedit/el.h:49,
                 from external/com_github_knz_go_libedit/unix/src/c-libedit/common.c:50:
external/com_github_knz_go_libedit/unix/src/c-libedit/histedit.h:267:28: note: expected 'wchar_t *' {aka 'int *'} but argument is of type 'wint_t *' {aka 'unsigned int *'}
  267 | int   el_wgetc(EditLine *, wchar_t *);
      |                            ^~~~~~~~~
``
@RaduBerinde
Copy link
Author

I see that we already maintain a set of patches that refresh.sh applies, so this should be easy to do?

@knz
Copy link
Owner

knz commented Mar 8, 2023

I believe this will be fixed by #25.

craig bot pushed a commit to cockroachdb/cockroach that referenced this issue Mar 10, 2023
98206: deps: update go-libedit r=rickystewart a=knz

I am expecting this will be one of the last updates to go-libedit since we plan to replace it with bubbline for good. However, this imports a few patches and reduces build warnings, which folk find useful.

xref knz/go-libedit#24

Release note: None
Epic: None

98287: roachtest: mvcc_gc disable lease rebalancing for stability r=erikgrinaker a=aliher1911

Test sometimes flakes if lease is moved from under GC and cleanup is not performed in time. This commit disables rebalance as it is not required to test GC functionality.
This commit also improves reliability of test by preventing a race between workload stop and table data deletion which could cause test to fail if workload doesn't terminate before clear range is performed.

Release note: None

Fixes #97340

Co-authored-by: Raphael 'kena' Poss <[email protected]>
Co-authored-by: Oleg Afanasyev <[email protected]>
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