FLUID: Fixes warnings.

This commit is contained in:
Matthias Melcher
2023-10-26 03:29:03 +02:00
parent f33dfc1c6a
commit 0d5ae9ceac
3 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -934,7 +934,7 @@ void Fd_Code_Writer::crc_add(const void *data, int n) {
if (!data) return; if (!data) return;
if (n==-1) n = (int)strlen((const char*)data); if (n==-1) n = (int)strlen((const char*)data);
const char *s = (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_) { if (block_line_start_) {
// don't count leading spaces and tabs in a line // don't count leading spaces and tabs in a line
while (n>0 && *s>0 && isspace(*s)) { s++; n--; } 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); long here = ::ftell(f);
::fseek(f, start, SEEK_SET); ::fseek(f, start, SEEK_SET);
char *block = (char*)::malloc(bsize+1); char *block = (char*)::malloc(bsize+1);
fread(block, bsize, 1, f); (void)fread(block, bsize, 1, f);
block[bsize] = 0; block[bsize] = 0;
unindent(block); unindent(block);
Fl_String str = block; Fl_String str = block;
@@ -1093,7 +1093,6 @@ int Fd_Code_Writer::merge_back(const char *s, int task) {
int line_no = 0; int line_no = 0;
long block_start = 0; long block_start = 0;
long block_end = 0; long block_end = 0;
long here = 0;
int num_changed_code = 0; int num_changed_code = 0;
int num_changed_callback = 0; int num_changed_callback = 0;
int num_changed_structure = 0; int num_changed_structure = 0;
+1 -1
View File
@@ -44,7 +44,7 @@ void update_sourceview_position() {
if (sv_autoposition->value()==0) if (sv_autoposition->value()==0)
return; return;
if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) { if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) {
int pos0, pos1; int pos0 = 0, pos1 = 0;
if (sv_source->visible_r()) { if (sv_source->visible_r()) {
switch (sv_code_choice) { switch (sv_code_choice) {
case 0: // prolog: not yet (include statements) case 0: // prolog: not yet (include statements)
+1 -1
View File
@@ -67,7 +67,7 @@ file.} open return_type void
if (sv_autoposition->value()==0) if (sv_autoposition->value()==0)
return; return;
if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) { if (sourceview_panel && sourceview_panel->visible() && Fl_Type::current) {
int pos0, pos1; int pos0 = 0, pos1 = 0;
if (sv_source->visible_r()) { if (sv_source->visible_r()) {
switch (sv_code_choice) { switch (sv_code_choice) {
case 0: // prolog: not yet (include statements) case 0: // prolog: not yet (include statements)