git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f05e2b
)
Fixing clang compilation errors
author
John Hodge (sonata)
<
[email protected]
>
Sat, 19 Jan 2013 16:32:19 +0000
(
00:32
+0800)
committer
John Hodge (sonata)
<
[email protected]
>
Sat, 19 Jan 2013 16:32:19 +0000
(
00:32
+0800)
Usermode/Applications/axwin3_src/WM/renderers/framebuffer.c
patch
|
blob
|
history
Usermode/Applications/dhcpclient_src/main.c
patch
|
blob
|
history
Usermode/Applications/irc_src/main.c
patch
|
blob
|
history
Usermode/Applications/telnetd_src/main.c
patch
|
blob
|
history
Usermode/Libraries/libc.so_src/stdio.c
patch
|
blob
|
history
diff --git
a/Usermode/Applications/axwin3_src/WM/renderers/framebuffer.c
b/Usermode/Applications/axwin3_src/WM/renderers/framebuffer.c
index
fc838cb
..
68a3f8c
100644
(file)
--- a/
Usermode/Applications/axwin3_src/WM/renderers/framebuffer.c
+++ b/
Usermode/Applications/axwin3_src/WM/renderers/framebuffer.c
@@
-16,7
+16,6
@@
typedef struct
{
short W, H;
void *Data;
- char _data[];
} tFBBuffer;
typedef struct
{
@@
-162,7
+161,7
@@
int _Handle_CreateBuf(tWindow *Target, size_t Len, const void *Data)
buf = malloc(sizeof(tFBBuffer) + msg->W * msg->H * 4);
buf->W = msg->W;
buf->H = msg->H;
- buf->Data = buf
->_data
;
+ buf->Data = buf
+ 1
;
info->Buffers[msg->Buffer] = buf;
diff --git
a/Usermode/Applications/dhcpclient_src/main.c
b/Usermode/Applications/dhcpclient_src/main.c
index
b9b2814
..
73e85d8
100644
(file)
--- a/
Usermode/Applications/dhcpclient_src/main.c
+++ b/
Usermode/Applications/dhcpclient_src/main.c
@@
-528,7
+528,7
@@
void SetAddress(tInterface *Iface, void *Addr, void *Mask, void *Router)
_SysIOCtl(Iface->IfaceFD, 6, Addr);
_SysIOCtl(Iface->IfaceFD, 7, &mask_bits);
- if( Router )
;
+ if( Router )
{
uint8_t *addr = Router;
_SysDebug("Router %i.%i.%i.%i", addr[0], addr[1], addr[2], addr[3]);
diff --git
a/Usermode/Applications/irc_src/main.c
b/Usermode/Applications/irc_src/main.c
index
9e5a075
..
16eee39
100644
(file)
--- a/
Usermode/Applications/irc_src/main.c
+++ b/
Usermode/Applications/irc_src/main.c
@@
-78,7
+78,7
@@
char *gsNickname = "acess";
tServer *gpServers;
\r
tWindow gWindow_Status = {
\r
NULL, NULL, NULL, // No next, empty list, no server
\r
- 0,
""
// No activity, empty name (rendered as status)
\r
+ 0,
{""}
// No activity, empty name (rendered as status)
\r
};
\r
tWindow *gpWindows = &gWindow_Status;
\r
tWindow *gpCurrentWindow = &gWindow_Status;
\r
diff --git
a/Usermode/Applications/telnetd_src/main.c
b/Usermode/Applications/telnetd_src/main.c
index
a4f5e0d
..
bf6de99
100644
(file)
--- a/
Usermode/Applications/telnetd_src/main.c
+++ b/
Usermode/Applications/telnetd_src/main.c
@@
-55,17
+55,17
@@
int main(int argc, char *argv[])
return 0;
}
+static void FD_SET_MAX(fd_set *set, int fd, int *maxfd)
+{
+ FD_SET(fd, set);
+ if(*maxfd < fd) *maxfd = fd;
+}
+
void EventLoop(void)
{
fd_set fds;
int maxfd;
- void FD_SET_MAX(fd_set *set, int fd, int *maxfd)
- {
- FD_SET(fd, set);
- if(*maxfd < fd) *maxfd = fd;
- }
-
for( ;; )
{
FD_ZERO(&fds);
diff --git
a/Usermode/Libraries/libc.so_src/stdio.c
b/Usermode/Libraries/libc.so_src/stdio.c
index
17bdf49
..
e25a6b6
100644
(file)
--- a/
Usermode/Libraries/libc.so_src/stdio.c
+++ b/
Usermode/Libraries/libc.so_src/stdio.c
@@
-458,7
+458,7
@@
EXPORT int vsprintf(char * __s, const char *__format, va_list __args)
return vsnprintf(__s, 0x7FFFFFFF, __format, __args);
\r
}
\r
\r
-//sprintfv
\r
+
\r
/**
\r
* \fn EXPORT void vsnprintf(char *buf, const char *format, va_list args)
\r
* \brief Prints a formatted string to a buffer
\r
@@
-476,11
+476,11
@@
EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg
uint64_t arg;
\r
int bLongLong, bPadLeft;
\r
\r
- void _addchar(char ch)
\r
- {
\r
- if(buf && pos < __maxlen) buf[pos] = ch;
\r
- pos ++;
\r
- }
\r
+ #define _addchar(ch) do { \
\r
+ if(buf && pos < __maxlen) buf[pos] = (ch); \
\r
+ else (void)(ch); \
\r
+ pos ++;
\
\r
+ }
while(0)
\r
\r
tmp[32] = '\0';
\r
\r
@@
-643,6
+643,7
@@
EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list arg
}
\r
_addchar('\0');
\r
pos --;
\r
+ #undef _addchar
\r
\r
//_SysDebug("vsnprintf: buf = '%s'", buf);
\r
\r
UCC
git Repository :: git.ucc.asn.au