aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-24 16:00:03 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit12e5135d95dc34fd7f7a7c50d6dbac453f252683 (patch)
treeeb9d1225855a02aa90f4fa5f90228018e6fa1785 /src
parentf11c4b63ff74bffb1d42d95167b3384a2f7765ea (diff)
Add result check for msvc
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c2
-rw-r--r--src/parser.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 4bd3b68..84fb5fa 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -16,7 +16,7 @@ void buffer_deinit(Buffer *self) {
self->capacity = 0;
}
-static WARN_UNUSED_RESULT int buffer_ensure_capacity(Buffer *self, usize new_capacity) {
+static CHECK_RESULT int buffer_ensure_capacity(Buffer *self, usize new_capacity) {
usize capacity;
void *new_mem;
int alloc_result;
diff --git a/src/parser.c b/src/parser.c
index f68bbf0..a8fa207 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -4,7 +4,7 @@
#include "../include/alloc.h"
#include <stdio.h>
-static WARN_UNUSED_RESULT int parser_parse_body(Parser *self, Ast *ast);
+static CHECK_RESULT int parser_parse_body(Parser *self, Ast *ast);
int parser_init(Parser *self) {
buffer_init(&self->ast_objects);
@@ -22,7 +22,7 @@ void parser_deinit(Parser *self) {
/*
LHS = 'const'|'var' IDENTIFIER
*/
-static WARN_UNUSED_RESULT int parser_parse_lhs(Parser *self, LhsExpr **result) {
+static CHECK_RESULT int parser_parse_lhs(Parser *self, LhsExpr **result) {
bool isConst;
BufferView var_name;
*result = NULL;
@@ -46,7 +46,7 @@ static WARN_UNUSED_RESULT int parser_parse_lhs(Parser *self, LhsExpr **result) {
/*
FUNC_DECL = '(' PARAM* ')' '{' BODY* '}'
*/
-static WARN_UNUSED_RESULT int parser_parse_function_decl(Parser *self, FunctionDecl **func_decl) {
+static CHECK_RESULT int parser_parse_function_decl(Parser *self, FunctionDecl **func_decl) {
bool result;
*func_decl = NULL;
@@ -85,7 +85,7 @@ static WARN_UNUSED_RESULT int parser_parse_function_decl(Parser *self, FunctionD
/*
FUNC_CALL = IDENTIFIER '(' ARGS* ')'
*/
-static WARN_UNUSED_RESULT int parser_parse_function_call(Parser *self, FunctionCall **func_call) {
+static CHECK_RESULT int parser_parse_function_call(Parser *self, FunctionCall **func_call) {
bool result;
BufferView func_name;
*func_call = NULL;
@@ -107,7 +107,7 @@ static WARN_UNUSED_RESULT int parser_parse_function_call(Parser *self, FunctionC
/*
RHS = FUNC_DECL | FUNC_CALL
*/
-static WARN_UNUSED_RESULT int parser_parse_rhs(Parser *self, Ast *rhs_expr) {
+static CHECK_RESULT int parser_parse_rhs(Parser *self, Ast *rhs_expr) {
FunctionDecl *func_decl;
FunctionCall *func_call;
Token token;