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

GCC warnings #77

Open
EugeneZelenko opened this issue Oct 22, 2014 · 0 comments
Open

GCC warnings #77

EugeneZelenko opened this issue Oct 22, 2014 · 0 comments

Comments

@EugeneZelenko
Copy link

I think will be good idea to fix next GCC warnings:

linenoiseHistoryAdd() is defined in linenoise.h.

If functions without prototypes in linenoise.h are not intended to be used outside linenoise.c they should be made static.

Compiling C file linenoise.c (debug + pic)
linenoise.c:173:5: warning: redundant redeclaration of 'linenoiseHistoryAdd' [-Wredundant-decls]
int linenoiseHistoryAdd(const char *line);
^
In file included from linenoise.c:117:0:
linenoise.h:54:5: note: previous declaration of 'linenoiseHistoryAdd' was here
int linenoiseHistoryAdd(const char *line);
^
linenoise.c:594:5: warning: no previous prototype for 'linenoiseEditInsert' [-Wmissing-prototypes]
int linenoiseEditInsert(struct linenoiseState *l, char c) {
^
linenoise.c:621:6: warning: no previous prototype for 'linenoiseEditMoveLeft' [-Wmissing-prototypes]
void linenoiseEditMoveLeft(struct linenoiseState *l) {
^
linenoise.c:629:6: warning: no previous prototype for 'linenoiseEditMoveRight' [-Wmissing-prototypes]
void linenoiseEditMoveRight(struct linenoiseState *l) {
^
linenoise.c:637:6: warning: no previous prototype for 'linenoiseEditMoveHome' [-Wmissing-prototypes]
void linenoiseEditMoveHome(struct linenoiseState *l) {
^
linenoise.c:645:6: warning: no previous prototype for 'linenoiseEditMoveEnd' [-Wmissing-prototypes]
void linenoiseEditMoveEnd(struct linenoiseState *l) {
^
linenoise.c:656:6: warning: no previous prototype for 'linenoiseEditHistoryNext' [-Wmissing-prototypes]
void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) {
^
linenoise.c:680:6: warning: no previous prototype for 'linenoiseEditDelete' [-Wmissing-prototypes]
void linenoiseEditDelete(struct linenoiseState *l) {
^
linenoise.c:690:6: warning: no previous prototype for 'linenoiseEditBackspace' [-Wmissing-prototypes]
void linenoiseEditBackspace(struct linenoiseState *l) {
^
linenoise.c:702:6: warning: no previous prototype for 'linenoiseEditDeletePrevWord' [-Wmissing-prototypes]
void linenoiseEditDeletePrevWord(struct linenoiseState *l) {

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

1 participant