use unused
This commit is contained in:
parent
0bdbaa7f1f
commit
b451548bec
6
Makefile
6
Makefile
@ -4,11 +4,11 @@ MAKEFLAGS += -j $(shell nproc)
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
C_FLAGS = \
|
C_FLAGS = \
|
||||||
|
-I. \
|
||||||
-std=c17 \
|
-std=c17 \
|
||||||
-Wall -Wextra -Wpedantic -Wconversion \
|
-Wall -Wextra -Wpedantic -Wconversion \
|
||||||
-pedantic -pedantic-errors \
|
-pedantic -pedantic-errors \
|
||||||
-Wno-unused-variable \
|
-Wno-unused-function \
|
||||||
-I. \
|
|
||||||
|
|
||||||
L_FLAGS = -pthread
|
L_FLAGS = -pthread
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ ifeq ($(RELEASE),1)
|
|||||||
F_FLAGS += -flto=auto
|
F_FLAGS += -flto=auto
|
||||||
OPTIMIZATION += -O3
|
OPTIMIZATION += -O3
|
||||||
else
|
else
|
||||||
C_FLAGS += -g
|
C_FLAGS += -g -Wno-unused-variable
|
||||||
F_FLAGS += -fsanitize=address,undefined,leak
|
F_FLAGS += -fsanitize=address,undefined,leak
|
||||||
OPTIMIZATION += -Og
|
OPTIMIZATION += -Og
|
||||||
endif
|
endif
|
||||||
|
3
common/unused.h
Normal file
3
common/unused.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define UNUSED __attribute__((unused))
|
@ -7,7 +7,5 @@
|
|||||||
-pedantic
|
-pedantic
|
||||||
-pedantic-errors
|
-pedantic-errors
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
# -Wno-unused-parameter
|
|
||||||
# -Wno-unused-function
|
|
||||||
-I.
|
-I.
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ void filedrive_construct(
|
|||||||
.drive = (Drive) {
|
.drive = (Drive) {
|
||||||
.self = drive,
|
.self = drive,
|
||||||
.block_size = block_size,
|
.block_size = block_size,
|
||||||
.block_amount = block_size,
|
.block_amount = block_amount,
|
||||||
.read = filedrive_drive_read,
|
.read = filedrive_drive_read,
|
||||||
.write = filedrive_drive_write,
|
.write = filedrive_drive_write,
|
||||||
},
|
},
|
||||||
|
4
vm/vm.c
4
vm/vm.c
@ -1,6 +1,7 @@
|
|||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
#include "common/arch.h"
|
#include "common/arch.h"
|
||||||
#include "common/op_str.h"
|
#include "common/op_str.h"
|
||||||
|
#include "common/unused.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -413,7 +414,8 @@ static inline void handle_device_read(VM* vm, Reg dst_reg, uint16_t device_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void handle_device_write(VM* vm, uint16_t op1, uint16_t device_id)
|
static inline void handle_device_write(
|
||||||
|
UNUSED VM* vm, UNUSED uint16_t op1, uint16_t device_id)
|
||||||
{
|
{
|
||||||
switch (device_id) {
|
switch (device_id) {
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user