summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-15 20:42:42 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-15 20:42:42 +0100
commit8b094e8af3215bed1c3c3c662e4b93163dac6bbc (patch)
tree4bfe94e43074e774cfe71186a467fabcd328406e /src
parentb3e1df35848003952369f8cbf05cdd41ae62d839 (diff)
Fix a bunch of compiler warnings, particularly for old compilers
Works now much better with old C99 and C++98 standard compilers. Fixed: C++ comments in C files and headers included by C files. There are still some warnings with C90 though but these would be hard to fix and left as-is for now. test/fractals.cxx: some arrays were too small by 1, or the compiler warned at least (false positive?). Anyway, it's fixed now.
Diffstat (limited to 'src')
-rw-r--r--src/flstring.h4
-rw-r--r--src/numericsort.c1
-rw-r--r--src/xutf8/utf8Wrap.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/flstring.h b/src/flstring.h
index e4c7ea491..04199d13e 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -82,8 +82,8 @@ FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t);
# define strlcat fl_strlcat
# endif /* !HAVE_STRLCAT */
-// promoted to <FL/fl_string_functions.h>
-//FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
+/* promoted to <FL/fl_string_functions.h> */
+/* FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); */
# ifndef HAVE_STRLCPY
# define strlcpy fl_strlcpy
# endif /* !HAVE_STRLCPY */
diff --git a/src/numericsort.c b/src/numericsort.c
index bf73bb927..244f0334d 100644
--- a/src/numericsort.c
+++ b/src/numericsort.c
@@ -73,7 +73,6 @@ static int numericsort(struct dirent **A, struct dirent **B, int cs) {
}
if (a >= end_a) break;
- //a++; b++;
}
}
if (!ret) return 0;
diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c
index 5ca8f25d4..4a2b45bb6 100644
--- a/src/xutf8/utf8Wrap.c
+++ b/src/xutf8/utf8Wrap.c
@@ -37,7 +37,7 @@
*/
/* The ARM header files have a bug by not taking into account that ARM cpu
- * likes packing to 4 bytes. This little trick defines our own version of
+ * likes padding to 4 bytes. This little trick defines our own version of
* XChar2b which does not have this problem
*/