Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 4e34e6c

Browse files
Fix compiler warnings for external.c and external.h
1 parent 88802b0 commit 4e34e6c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

libexternal/include/revolution/external.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ extern const char *ConvertCStringFromNativeToUTF8(const char *p_native, int *r_s
519519
extern const char *ConvertCStringToNativeFromUTF8(const char *p_utf8, int *r_success);
520520

521521
#ifdef __cplusplus
522-
};
522+
}
523523
#endif
524524

525525
///////////////////////////////////////////////////////////////////////////////

libexternal/src/external.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <stdlib.h>
22
#include <string.h>
33
#include <stdio.h>
4+
#include <stdint.h>
45

56
#include <revolution/external.h>
67

@@ -92,7 +93,7 @@ enum
9293
/* V2 */ SECURITY_CHECK_LIBRARY_UTF8
9394
};
9495

95-
typedef char *(*ExternalOperationCallback)(const char *p_arg_1, const char *p_arg_2, const char *p_arg_3, int *r_success);
96+
typedef char *(*ExternalOperationCallback)(const void *p_arg_1, const void *p_arg_2, const void *p_arg_3, int *r_success);
9697
typedef void (*ExternalDeleteCallback)(void *p_block);
9798

9899
typedef Bool (*ExternalSecurityHandler)(const char *p_op);
@@ -406,7 +407,7 @@ void RunloopWait(int *r_success)
406407
return;
407408
}
408409

409-
t_result = (s_operations[OPERATION_RUNLOOP_WAIT])(NULL, NULL, NULL, &r_success);
410+
t_result = (s_operations[OPERATION_RUNLOOP_WAIT])(NULL, NULL, NULL, r_success);
410411
if (t_result != NULL)
411412
s_delete(t_result);
412413
}
@@ -422,7 +423,7 @@ void StackToWindowRect(unsigned int p_win_id, MCRectangle32 *x_rect, int *r_succ
422423
return;
423424
}
424425

425-
t_result = (s_operations[OPERATION_STACK_TO_WINDOW_RECT])(p_win_id, x_rect, NULL, &r_success);
426+
t_result = (s_operations[OPERATION_STACK_TO_WINDOW_RECT])((const void*)(uintptr_t)p_win_id, x_rect, NULL, r_success);
426427
if (t_result != NULL)
427428
s_delete(t_result);
428429
}
@@ -437,7 +438,7 @@ void WindowToStackRect(unsigned int p_win_id, MCRectangle32 *x_rect, int *r_succ
437438
return;
438439
}
439440

440-
t_result = (s_operations[OPERATION_WINDOW_TO_STACK_RECT])(p_win_id, x_rect, NULL, &r_success);
441+
t_result = (s_operations[OPERATION_WINDOW_TO_STACK_RECT])((const void*)(uintptr_t)p_win_id, x_rect, NULL, r_success);
441442
if (t_result != NULL)
442443
s_delete(t_result);
443444
}

0 commit comments

Comments
 (0)