fixed all those warnings
This commit is contained in:
@@ -701,7 +701,6 @@ static nn_Exit ncl_fsHandler(nn_FSRequest *req) {
|
||||
ncl_FSState *state = req->state;
|
||||
nn_Context *ctx = req->ctx;
|
||||
nn_Computer *C = req->computer;
|
||||
const nn_Filesystem *fs = req->fs;
|
||||
|
||||
if(req->action == NN_FS_DROP) {
|
||||
for(size_t i = 0; i < NN_MAX_OPENFILES; i++) {
|
||||
@@ -2433,10 +2432,10 @@ static nn_Exit ncl_gpuHandler(nn_GPURequest *req) {
|
||||
nn_lock(ctx, st->lock);
|
||||
if(st->screenAddress != NULL) {
|
||||
size_t len = strlen(st->screenAddress);
|
||||
if(len >= NN_MAX_ADDRESS)
|
||||
if(len >= NN_MAX_ADDRESS) {
|
||||
len = NN_MAX_ADDRESS - 1;
|
||||
memcpy(req->screenAddr,
|
||||
st->screenAddress, len);
|
||||
}
|
||||
memcpy(req->screenAddr, st->screenAddress, len);
|
||||
req->screenAddr[len] = '\0';
|
||||
}
|
||||
nn_unlock(ctx, st->lock);
|
||||
|
||||
@@ -1204,13 +1204,6 @@ static nn_ComponentEntry *nn_getInternalComponent(nn_Computer *computer, const c
|
||||
return nn_hashGet(&computer->components, &lookingFor);
|
||||
}
|
||||
|
||||
static const nn_MethodEntry *nn_getInternalMethod(nn_Component *c, const char *method) {
|
||||
nn_MethodEntry lookingFor = {
|
||||
.name = method,
|
||||
};
|
||||
return nn_hashGet(&c->methodsMap, &lookingFor);
|
||||
}
|
||||
|
||||
nn_Exit nn_startComputer(nn_Computer *computer) {
|
||||
if(nn_isComputerOn(computer)) {
|
||||
nn_stopComputer(computer);
|
||||
@@ -3745,9 +3738,7 @@ typedef enum nn_CompNum {
|
||||
static nn_Exit nn_computerHandler(nn_ComponentRequest *req) {
|
||||
if(req->action == NN_COMP_DROP) return NN_OK;
|
||||
if(req->action == NN_COMP_SIGNAL) return NN_OK;
|
||||
nn_Computer *target = req->state;
|
||||
nn_Computer *src = req->computer;
|
||||
nn_CompNum method = req->methodIdx;
|
||||
if(src) nn_setError(src, "computer: not implemented yet");
|
||||
return NN_EBADCALL;
|
||||
}
|
||||
@@ -4445,7 +4436,6 @@ static nn_Exit nn_drvHandler(nn_ComponentRequest *request) {
|
||||
}
|
||||
size_t ss = state->drive.sectorSize;
|
||||
size_t sectorCount = state->drive.capacity / ss;
|
||||
size_t perPlatter = sectorCount / state->drive.platterCount;
|
||||
unsigned int method = request->methodIdx;
|
||||
if(method == NN_DRVNUM_GETCAPACITY) {
|
||||
request->returnCount = 1;
|
||||
|
||||
Reference in New Issue
Block a user