fix opts.c to use correct integer types

This commit is contained in:
2025-08-20 13:18:27 +02:00
parent dbcf29dc82
commit 6ce633b06b
2 changed files with 5 additions and 2 deletions

View File

@@ -5,8 +5,9 @@
#include <stdlib.h> #include <stdlib.h>
#include "error.h" #include "error.h"
#include "util/intdef.h"
uint8_t getoptions(int32_t argc, char *const *argv, int32_t *ncpus) { u8 getoptions(int argc, char *const *argv, int *ncpus) {
uint8_t opts = 0; uint8_t opts = 0;
char opt; char opt;

View File

@@ -1,6 +1,8 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#include "util/intdef.h"
enum opt { enum opt {
OPT_LIST_CORES = 1, // option that lists the total amount of cores that are set OPT_LIST_CORES = 1, // option that lists the total amount of cores that are set
OPT_SET_ALL = 2, // option to set all cores, regardless of their assumed state OPT_SET_ALL = 2, // option to set all cores, regardless of their assumed state
@@ -8,4 +10,4 @@ enum opt {
OPT_INVERT = 8, // 'num' now represents the amount of cores to disable OPT_INVERT = 8, // 'num' now represents the amount of cores to disable
}; };
uint8_t getoptions(int32_t, char *const *, int32_t *); u8 getoptions(int argc, char *const *argv, int *ncpus);