mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
Add missing void to empty arguments list
This isn't technically required in those cases (we're in a definition, not in a declaration), but let's add it for consistency.
This commit is contained in:
@@ -9,7 +9,7 @@ noreturn void fatal_error(const char* fmt, ...) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
void setup(void) {
|
||||
// set output to line-buffered for easier debugging
|
||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||
setvbuf(stderr, NULL, _IOLBF, 0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
char* argv[] = {"./fork", NULL};
|
||||
execv(argv[0], argv);
|
||||
return 0;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
int fd = open("test.open.file", O_CREAT | O_RDWR, S_IRWXU);
|
||||
|
||||
int fd2 = open("fs.manifest", O_RDONLY);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
pid_t pid = vfork();
|
||||
if (pid < 0) {
|
||||
printf("failed on vfork (%s)\n", strerror(errno));
|
||||
|
||||
@@ -62,7 +62,7 @@ void* write_eventfd_thread(void* arg) {
|
||||
|
||||
/* This function used to test polling on a group of eventfd descriptors.
|
||||
* To support regression testing, positive value returned for error case. */
|
||||
int eventfd_using_poll() {
|
||||
int eventfd_using_poll(void) {
|
||||
int ret = 0;
|
||||
struct pollfd pollfds[MAX_EFDS];
|
||||
pthread_t tid = 0;
|
||||
@@ -140,7 +140,7 @@ out:
|
||||
/* This function used to test various flags supported while creating eventfd
|
||||
* descriptors.
|
||||
* To support regression testing, positive value returned for error case. */
|
||||
int eventfd_using_various_flags() {
|
||||
int eventfd_using_various_flags(void) {
|
||||
uint64_t count = 0;
|
||||
int efd = 0;
|
||||
ssize_t bytes = 0;
|
||||
@@ -216,7 +216,7 @@ int eventfd_using_various_flags() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eventfd_using_fork() {
|
||||
int eventfd_using_fork(void) {
|
||||
int status = 0;
|
||||
int efd = 0;
|
||||
uint64_t count = 0;
|
||||
|
||||
@@ -24,7 +24,7 @@ struct linux_dirent64 {
|
||||
|
||||
#define BUF_SIZE 512
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
int rv, fd, offs;
|
||||
const mode_t perm = S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH;
|
||||
char buf[BUF_SIZE];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
printf("Hello world\n");
|
||||
return 42;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#define TEST_LENGTH 0x10000f000
|
||||
#define TEST_LENGTH2 0x8000f000
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
FILE* fp = fopen("testfile", "a+");
|
||||
if (!fp) {
|
||||
perror("fopen");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
printf("Hello world\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ void print_list_reverse(LISTP_TYPE(simple)* listp) {
|
||||
printf("End of list\n\n");
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
int i;
|
||||
struct simple* tmp;
|
||||
struct simple* tmp2;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "pal.h"
|
||||
#include "pal_debug.h"
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* Initialize the two argument vectors */
|
||||
__m256 evens = _mm256_set_ps(2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0);
|
||||
__m256 odds = _mm256_set_ps(1.0, 3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0);
|
||||
|
||||
@@ -30,7 +30,7 @@ void pal_failure_handler(PAL_PTR event, PAL_NUM error, PAL_CONTEXT* context) {
|
||||
DkExceptionReturn(event);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
pal_printf("Started main thread.\n");
|
||||
|
||||
DkSetExceptionHandler(pal_failure_handler, PAL_EVENT_FAILURE);
|
||||
|
||||
@@ -54,7 +54,7 @@ void handler4(PAL_PTR event, PAL_NUM arg, PAL_CONTEXT * context)
|
||||
}
|
||||
|
||||
|
||||
static void red_zone_test() {
|
||||
static void red_zone_test(void) {
|
||||
uint64_t res = 0;
|
||||
|
||||
// First call some function to ensure that gcc doesn't use the red zone
|
||||
|
||||
@@ -11,7 +11,7 @@ noreturn void __abort(void) {
|
||||
DkProcessExit(-131);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
char x[] = {0xde, 0xad, 0xbe, 0xef};
|
||||
char y[] = {0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd};
|
||||
pal_printf("Hex test 1 is %s\n", ALLOCA_BYTES2HEXSTR(x));
|
||||
|
||||
@@ -48,7 +48,7 @@ int thread4_run(void* args) {
|
||||
|
||||
// If there's a thread limit, like on SGX, it should be set to exactly 2. There
|
||||
// should be only the main thread and only one other thread at a time.
|
||||
int main() {
|
||||
int main(void) {
|
||||
pal_printf("Thread 1 (main) started.\n");
|
||||
|
||||
PAL_HANDLE thread2 = DkThreadCreate(thread2_run, NULL);
|
||||
|
||||
@@ -489,7 +489,7 @@ failed:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int get_file_check_policy ()
|
||||
int get_file_check_policy(void)
|
||||
{
|
||||
return file_check_policy;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ static inline void __free(void* addr, int size) {
|
||||
|
||||
static SLAB_MGR untrusted_slabmgr = NULL;
|
||||
|
||||
void init_untrusted_slab_mgr() {
|
||||
void init_untrusted_slab_mgr(void) {
|
||||
if (untrusted_slabmgr)
|
||||
return;
|
||||
|
||||
|
||||
@@ -956,7 +956,7 @@ static int load_enclave (struct pal_enclave * enclave,
|
||||
* each stack page (Linux dynamically grows the stack of the main thread but gets confused with
|
||||
* huge-jump stack accesses coming from within the enclave). Note that other, non-main threads
|
||||
* are created manually via clone(.., THREAD_STACK_SIZE, ..) and thus do not need this hack. */
|
||||
static void __attribute__ ((noinline)) force_linux_to_grow_stack() {
|
||||
static void __attribute__ ((noinline)) force_linux_to_grow_stack(void) {
|
||||
char dummy[THREAD_STACK_SIZE];
|
||||
for (uint64_t i = 0; i < sizeof(dummy); i += PRESET_PAGESIZE) {
|
||||
/* touch each page on the stack just to make it is not optimized away */
|
||||
|
||||
@@ -37,7 +37,7 @@ void set_verbose(bool verbose) {
|
||||
DBG("Verbose output disabled\n");
|
||||
}
|
||||
|
||||
bool get_verbose() {
|
||||
bool get_verbose(void) {
|
||||
return g_verbose;
|
||||
}
|
||||
|
||||
@@ -187,6 +187,6 @@ int parse_hex(const char* hex, void* buffer, size_t buffer_size) {
|
||||
}
|
||||
|
||||
/* For PAL's assert compatibility */
|
||||
void __abort() {
|
||||
void __abort(void) {
|
||||
ERROR("exiting\n");
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ int thread_2(void* args) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
pal_printf("Enter Main Thread\n");
|
||||
|
||||
PAL_HANDLE thd1, thd2;
|
||||
|
||||
Reference in New Issue
Block a user