Skip to content

Commit

Permalink
Miscellaneous compilation warning fixes
Browse files Browse the repository at this point in the history
main.c:134: warning: no previous prototype for 'dix_main'
rootlessScreen.c: In function 'RootlessMarkOverlappedWindows':
rootlessScreen.c:434: warning: function declaration isn't a prototype
backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
set.c: In function 'RecordSetMemoryRequirements':
set.c:413: warning: old-style function definition
set.c: In function 'RecordCreateSet':
set.c:425: warning: old-style function definition
stub.c: In function ‘main’:
stub.c:236: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
  • Loading branch information
jeremyhu committed Dec 8, 2009
1 parent 955b9f2 commit 1b8f90a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 2 additions & 0 deletions dix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ BOOL serverInitComplete = FALSE;
pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;

int dix_main(int argc, char *argv[], char *envp[]);

int dix_main(int argc, char *argv[], char *envp[])
#else
int main(int argc, char *argv[], char *envp[])
Expand Down
3 changes: 2 additions & 1 deletion hw/xquartz/mach-startup/stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ int main(int argc, char **argv, char **envp) {

kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp);
if(kr != KERN_SUCCESS) {
fprintf(stderr, "Xquartz: Unable to locate waiting server: %s\n", server_bootstrap_name);
pid_t child;

fprintf(stderr, "Xquartz: Unable to locate waiting server: %s\n", server_bootstrap_name);
set_x11_path();

/* This forking is ugly and will be cleaned up later */
Expand Down
2 changes: 1 addition & 1 deletion miext/rootless/rootlessScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,

register WindowPtr pChild;
Bool anyMarked = FALSE;
void (* MarkWindow)() = pScreen->MarkWindow;
MarkWindowProcPtr MarkWindow = pScreen->MarkWindow;

RL_DEBUG_MSG("is top level! ");
/* single layered systems are easy */
Expand Down
4 changes: 2 additions & 2 deletions os/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ void xorg_backtrace(void)
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
if (info.dli_saddr)
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
info.dli_sname, (char *) array[i] - (char *) info.dli_saddr, array[i]);
info.dli_sname, (long unsigned int)((char *) array[i] - (char *) info.dli_saddr), array[i]);
else
ErrorF("%d: %s (%p+0x%lx) [%p]\n", i, mod,
info.dli_fbase, (char *) array[i] - (char *) info.dli_fbase, array[i]);
info.dli_fbase, (long unsigned int)((char *) array[i] - (char *) info.dli_fbase), array[i]);
}
}

Expand Down
11 changes: 2 additions & 9 deletions record/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,22 +406,15 @@ _RecordSetMemoryRequirements(RecordSetInterval *pIntervals, int nIntervals,
/* user-visible functions */

int
RecordSetMemoryRequirements(pIntervals, nIntervals, alignment)
RecordSetInterval *pIntervals;
int nIntervals;
int *alignment;
RecordSetMemoryRequirements(RecordSetInterval *pIntervals, int nIntervals, int *alignment)
{
RecordCreateSetProcPtr pCreateSet;
return _RecordSetMemoryRequirements(pIntervals, nIntervals, alignment,
&pCreateSet);
}

RecordSetPtr
RecordCreateSet(pIntervals, nIntervals, pMem, memsize)
RecordSetInterval *pIntervals;
int nIntervals;
void *pMem;
int memsize;
RecordCreateSet(RecordSetInterval *pIntervals, int nIntervals, void *pMem, int memsize)
{
RecordCreateSetProcPtr pCreateSet;
int alignment;
Expand Down

0 comments on commit 1b8f90a

Please sign in to comment.