Skip to content

Commit 9c8c197

Browse files
committed
[core] Fix type defs and warning.
1 parent 75f07af commit 9c8c197

File tree

5 files changed

+31
-29
lines changed

5 files changed

+31
-29
lines changed

include/SDL/SDL_stdinc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
#ifdef __DREAMCAST__
7575
void *memcpy_sh4(void *dest, const void *src, size_t count);
7676
void *memmove_sh4(void *dest, const void *src, size_t count);
77-
void *memset_sh4(void *dest, uint32 val, size_t count);
77+
void *memset_sh4(void *dest, uint32_t val, size_t count);
7878
#endif
7979

8080
/* The number of elements in an array */

include/network/http.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@
66
*/
77

88
#ifndef _DS_HTTP_H
9-
#define _DS_HTTP_H
9+
#define _DS_HTTP_H
1010

1111
#include <kos/net.h>
12-
#include <sys/socket.h>
13-
14-
/* File systems */
12+
#include <sys/socket.h>
13+
14+
/* File systems */
1515
int tcpfs_init();
1616
void tcpfs_shutdown();
1717

1818
int httpfs_init();
1919
void httpfs_shutdown();
2020

21-
21+
2222
/* DSN utils */
23-
int dns_init(const uint8 *ip);
24-
int dns(const char *name, struct in_addr* addr);
25-
int ds_gethostbyname(const struct sockaddr_in * dnssrv, const char *name, uint8 *ipout);
26-
27-
28-
/* URL utils */
23+
int dns_init(const uint8_t *ip);
24+
int dns(const char *name, struct in_addr* addr);
25+
int ds_gethostbyname(const struct sockaddr_in * dnssrv, const char *name, uint8_t *ipout);
26+
27+
28+
/* URL utils */
2929
void _url_split(char *proto, int proto_size,
3030
char *hostname, int hostname_size,
3131
int *port_ptr,
3232
char *path, int path_size,
33-
const char *url);
34-
35-
36-
/* httpd server */
37-
int httpd_init(int port);
38-
void httpd_shutdown();
39-
40-
33+
const char *url);
34+
35+
36+
/* httpd server */
37+
int httpd_init(int port);
38+
void httpd_shutdown();
39+
40+
4141
#endif /* _DS_HTTP_H */

include/utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int is_hacked_bios();
5353
int is_custom_bios();
5454
int is_no_syscalls();
5555

56-
uint32 gzip_get_file_size(const char *filename);
56+
uint32_t gzip_get_file_size(const char *filename);
5757

5858
void dbgio_set_dev_ds();
5959
void dbgio_set_dev_scif();
@@ -85,7 +85,7 @@ char *strndup(const char *, size_t);
8585
/* Optimized memory utils */
8686
void *memcpy_sh4(void *dest, const void *src, size_t count);
8787
void *memmove_sh4(void *dest, const void *src, size_t count);
88-
void *memset_sh4(void *dest, uint32 val, size_t count);
88+
void *memset_sh4(void *dest, uint32_t val, size_t count);
8989

9090
#ifndef strcasestr
9191
char *strcasestr(const char *str1, const char *str2);

lib/SDL_image/IMG_pvr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ SDL_Surface *IMG_LoadPVR_RW(SDL_RWops *src)
9595
Uint32 Amask;
9696
SDL_Surface *surface = NULL;
9797
char *error = NULL;
98-
uint8 *data;
98+
uint8_t *data;
9999

100100
if ( !src ) {
101101
/* The error message has been set in SDL_RWFromFile */
@@ -111,7 +111,7 @@ SDL_Surface *IMG_LoadPVR_RW(SDL_RWops *src)
111111
fprintf(stderr, "IMG_LoadPVR_RW: %d bytes\n", len);
112112
#endif
113113

114-
data = (uint8*) memalign(32, len);
114+
data = (uint8_t*) aligned_alloc(32, len);
115115

116116
if(data == NULL) {
117117
error = "no free memory";

src/irq/exceptions.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,21 @@ static void guard_irq_handler(irq_t source, irq_context_t *context, void *data)
145145

146146
/* not handled --> panic !! */
147147
//irq_dump_regs(0, source);
148-
148+
149149
dbgio_set_dev_fb();
150150
vid_clear(0, 0, 0);
151151
ConsoleInformation *con = GetConsole();
152-
152+
153153
for(i = 16; i > 0; i--) {
154154
dbglog(DBG_INFO, "%s\n", con->ConsoleLines[i]);
155155
}
156-
157-
dbglog(DBG_ERROR, "Unhandled Exception. Reboot after 10 seconds.");
156+
157+
dbglog(DBG_ERROR, "Unhandled Exception. Reboot after 3 seconds.");
158158

159159
//panic("Unhandled IRQ/Exception");
160-
timer_spin_sleep(10000);
160+
uint64_t timeout = timer_ms_gettime64() + 3000;
161+
while(timer_ms_gettime64() < timeout);
162+
161163
arch_reboot();
162164
// asic_sys_reset();
163165
}

0 commit comments

Comments
 (0)