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

sqlite3-unicode gcc warnings #35

Closed
ejurgensen opened this issue Feb 8, 2022 · 1 comment
Closed

sqlite3-unicode gcc warnings #35

ejurgensen opened this issue Feb 8, 2022 · 1 comment

Comments

@ejurgensen
Copy link

If you add -Wall gcc complains about a few things, see below. Might be good to fix?

$ gcc -Wall -fPIC -shared src/sqlite3-unicode.c -o dist/unicode.so
src/sqlite3-unicode.c:22: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   22 | #pragma warning(disable : 4305 13 90)
      | 
src/sqlite3-unicode.c:31:32: warning: multi-line comment [-Wcomment]
   31 | #define SQLITE3_UNICODE_UNACC  // ~ 30KB increase \
      |                                ^
src/sqlite3-unicode.c: In function ‘sqlite3StrNICmp’:
src/sqlite3-unicode.c:5278:12: warning: operation on ‘ua’ may be undefined [-Wsequence-point]
 5278 |         ua = GlogUpperToLower(ua);
      |            ^
src/sqlite3-unicode.c:5279:12: warning: operation on ‘ub’ may be undefined [-Wsequence-point]
 5279 |         ub = GlogUpperToLower(ub);
      |            ^
src/sqlite3-unicode.c: In function ‘sqlite3StrNICmp16’:
src/sqlite3-unicode.c:5292:12: warning: operation on ‘ua’ may be undefined [-Wsequence-point]
 5292 |         ua = GlogUpperToLower(ua);
      |            ^
src/sqlite3-unicode.c:5293:12: warning: operation on ‘ub’ may be undefined [-Wsequence-point]
 5293 |         ub = GlogUpperToLower(ub);
      |            ^
At top level:
src/sqlite3-unicode.c:4917:33: warning: ‘likeInfoAlt’ defined but not used [-Wunused-const-variable=]
 4917 | static const struct compareInfo likeInfoAlt = {'%', '_', 0, 0};
      |                                 ^~~~~~~~~~~
src/sqlite3-unicode.c:4911:33: warning: ‘globInfo’ defined but not used [-Wunused-const-variable=]
 4911 | static const struct compareInfo globInfo = {'*', '?', '[', 0};
      |                                 ^~~~~~~~
src/sqlite3-unicode.c:4340:36: warning: ‘sqlite3UpperToLower’ defined but not used [-Wunused-const-variable=]
 4340 | SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
      |                                    ^~~~~~~~~~~~~~~~~~~
@nalgeon
Copy link
Owner

nalgeon commented Feb 3, 2023

Finally fixed those! And a bunch of others 😅 build #159

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