Merge pull request #10 from speedy-lex/lsp-shut-up

tell lsp to shut up
This commit is contained in:
Quantum Tomato 2025-07-02 22:52:54 +02:00 committed by GitHub
commit 0551065b6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -330,7 +330,7 @@ void nn_fs_write(nn_filesystem *fs, void *_, nn_component *component, nn_compute
nn_value fdValue = nn_getArgument(computer, 0); nn_value fdValue = nn_getArgument(computer, 0);
size_t fd = nn_toInt(fdValue); size_t fd = nn_toInt(fdValue);
size_t spaceRemaining = fs->spaceTotal(component, fs->userdata) - fs->spaceUsed(component, fs->userdata); // size_t spaceRemaining = fs->spaceTotal(component, fs->userdata) - fs->spaceUsed(component, fs->userdata);
nn_value bufferValue = nn_getArgument(computer, 1); nn_value bufferValue = nn_getArgument(computer, 1);
size_t len = 0; size_t len = 0;
@ -401,10 +401,10 @@ void nn_fs_seek(nn_filesystem *fs, void *_, nn_component *component, nn_computer
return; return;
} }
size_t capacity = fs->spaceTotal(component, fs->userdata); // size_t capacity = fs->spaceTotal(component, fs->userdata);
int moved = 0; int moved = 0;
size_t pos = fs->seek(component, fs->userdata, fd, whence, off, &moved); /* size_t pos = */ fs->seek(component, fs->userdata, fd, whence, off, &moved);
if(moved < 0) moved = -moved; if(moved < 0) moved = -moved;
// do not ask where it comes from, balance is hard // do not ask where it comes from, balance is hard

View File

@ -532,6 +532,7 @@ int testLuaArch_unicode_char(lua_State *L) {
unsigned int *codepoints = nn_alloc(alloc, sizeof(unsigned int) * argc); unsigned int *codepoints = nn_alloc(alloc, sizeof(unsigned int) * argc);
if(codepoints == NULL) { if(codepoints == NULL) {
luaL_error(L, "out of memory"); luaL_error(L, "out of memory");
return 0; // tell lsp to shut the fuck up
} }
for(int i = 0; i < argc; i++) { for(int i = 0; i < argc; i++) {
int idx = i + 1; int idx = i + 1;