diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-26 03:29:03 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-26 03:29:03 +0200 |
| commit | 0d5ae9ceac960f8fdc304037a965c91dacc0411b (patch) | |
| tree | 6fda98b2dab11420bba5da13e2c8aa8d8acf7b8a | |
| parent | f33dfc1c6a2c4af2f463cbece4ca6eff2d1575ae (diff) | |
FLUID: Fixes warnings.
| -rw-r--r-- | fluid/code.cxx | 5 | ||||
| -rw-r--r-- | fluid/sourceview_panel.cxx | 2 | ||||
| -rw-r--r-- | fluid/sourceview_panel.fl | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index 6747d73ba..2b5dcde44 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -934,7 +934,7 @@ void Fd_Code_Writer::crc_add(const void *data, int n) { if (!data) return; if (n==-1) n = (int)strlen((const char*)data); const char *s = (const char*)data; - for (int i=n; n>0; --n, ++s) { + for ( ; n>0; --n, ++s) { if (block_line_start_) { // don't count leading spaces and tabs in a line while (n>0 && *s>0 && isspace(*s)) { s++; n--; } @@ -1014,7 +1014,7 @@ static Fl_String unindent_block(FILE *f, long start, long end) { long here = ::ftell(f); ::fseek(f, start, SEEK_SET); char *block = (char*)::malloc(bsize+1); - fread(block, bsize, 1, f); + (void)fread(block, bsize, 1, f); block[bsize] = 0; unindent(block); Fl_String str = block; @@ -1093,7 +1093,6 @@ int Fd_Code_Writer::merge_back(const char *s, int task) { int line_no = 0; long block_start = 0; long block_end = 0; - long here = 0; int num_changed_code = 0; int num_changed_callback = 0; int num_changed_structure = 0; diff --git a/fluid/sourceview_panel.cxx b/fluid/sourceview_panel.cxx index 79c034702..78a69e100 100644 --- a/fluid/sourceview_panel.cxx +++ b/fluid/sourceview_panel.cxx @@ -44,7 +44,7 @@ void update_sourceview_position() { if (sv_autoposition->value()==0) return; if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) { - int pos0, pos1; + int pos0 = 0, pos1 = 0; if (sv_source->visible_r()) { switch (sv_code_choice) { case 0: // prolog: not yet (include statements) diff --git a/fluid/sourceview_panel.fl b/fluid/sourceview_panel.fl index 99089f299..0cb665ff1 100644 --- a/fluid/sourceview_panel.fl +++ b/fluid/sourceview_panel.fl @@ -67,7 +67,7 @@ file.} open return_type void if (sv_autoposition->value()==0) return; if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) { - int pos0, pos1; + int pos0 = 0, pos1 = 0; if (sv_source->visible_r()) { switch (sv_code_choice) { case 0: // prolog: not yet (include statements) |
