summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-01-29 13:14:22 -0800
committerGaetan Nadon <memsize@videotron.ca>2014-02-25 15:58:57 -0500
commit2c7945278c8f5b7c70b0ef12b4024caa43ac152e (patch)
tree08c6259a2e9e61fe9ce82778766374768aecf1fc
parentb7cd80d37de51311e4cbf73dc9cdf231c5352bb1 (diff)
Warning fixes.
XFS replicates quite a bit of X server infrastructure so that it can share libXfont. Many of those shared functions are declared in shared font header files (either fontsproto.h or fontmisc.h). This patch removes duplicate definitions from the XFS header files and makes sure the shared header files are included in the right places to get the functions declared before being defined. Of course, some of those function types have changed, in particular CopyISOLatin1Lowered now takes a const char * source parameter. This patch also stops re-using the 'port' variable in GetInetdListenInfo when fetching the ReopenInfo. That's not strictly necessary here, but will be useful when the Reopen API in libxtrans changes to take a constant parameter. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--difs/difsutils.c5
-rw-r--r--difs/fonts.c8
-rw-r--r--include/difs.h4
-rw-r--r--include/difsutils.h2
-rw-r--r--include/misc.h1
-rw-r--r--os/xfstrans.c3
6 files changed, 11 insertions, 12 deletions
diff --git a/difs/difsutils.c b/difs/difsutils.c
index 67b3454..0dd99b5 100644
--- a/difs/difsutils.c
+++ b/difs/difsutils.c
@@ -190,10 +190,11 @@ XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe)
}
void
-CopyISOLatin1Lowered(char *d, char *s, int length)
+CopyISOLatin1Lowered(char *d, const char *s, int length)
{
register int i;
- unsigned char *dest = (unsigned char *)d, *source = (unsigned char *)s;
+ unsigned char *dest = (unsigned char *)d;
+ const unsigned char *source = (const unsigned char *)s;
for (i = 0; i < length; i++, source++, dest++) {
if ((*source >= XK_A) && (*source <= XK_Z))
diff --git a/difs/fonts.c b/difs/fonts.c
index 6d46589..3164049 100644
--- a/difs/fonts.c
+++ b/difs/fonts.c
@@ -169,7 +169,7 @@ RemoveFontWakeup(FontPathElementPtr fpe)
/* ARGSUSED */
static void
-FontWakeup(pointer data, int count, unsigned long *LastSelectMask)
+FontWakeup(pointer data, int count, unsigned long *lastSelectMask)
{
int i;
FontPathElementPtr fpe;
@@ -179,7 +179,7 @@ FontWakeup(pointer data, int count, unsigned long *LastSelectMask)
/* wake up any fpe's that may be waiting for information */
for (i = 0; i < num_slept_fpes; i++) {
fpe = slept_fpes[i];
- (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe, LastSelectMask);
+ (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe, lastSelectMask);
}
}
@@ -1404,7 +1404,7 @@ LoadGlyphRanges(
int
RegisterFPEFunctions(
- Bool (*name_func) (char *name),
+ NameCheckFunc name_func,
InitFpeFunc init_func,
FreeFpeFunc free_func,
ResetFpeFunc reset_func,
@@ -1418,7 +1418,7 @@ RegisterFPEFunctions(
LoadGlyphsFunc load_glyphs,
StartLaFunc start_list_alias_func,
NextLaFunc next_list_alias_func,
- void (*set_path_func) (void))
+ SetPathFunc set_path_func)
{
FPEFunctions *new;
diff --git a/include/difs.h b/include/difs.h
index 4f72d91..aed0cd6 100644
--- a/include/difs.h
+++ b/include/difs.h
@@ -29,6 +29,7 @@
#include "difsfn.h"
#include "globals.h"
#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/fontmisc.h>
typedef int (*InitialFunc)(ClientPtr);
typedef int (*ProcFunc)(ClientPtr);
@@ -42,9 +43,6 @@ extern ReplySwapFunc ReplySwapVector[NUM_PROC_VECTORS];
/* FIXME: this is derived from fontstruct.h; should integrate it */
/* difs/atom.c */
-extern Atom MakeAtom ( const char *string, unsigned len, Bool makeit );
-extern int ValidAtom ( Atom atom );
-extern char * NameForAtom ( Atom atom );
extern void InitAtoms ( void );
/* difs/charinfo.c */
diff --git a/include/difsutils.h b/include/difsutils.h
index 43f1f8b..efc785c 100644
--- a/include/difsutils.h
+++ b/include/difsutils.h
@@ -30,6 +30,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <auth.h>
#include <X11/fonts/font.h>
#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/fontmisc.h>
typedef void (*DifsWakeupFunc)(pointer data, int result, unsigned long * pReadmask);
typedef Bool (*DifsWorkFunc) (ClientPtr, pointer);
@@ -57,7 +58,6 @@ extern pointer Xalloc (unsigned long m);
extern pointer Xrealloc (pointer n, unsigned long m);
extern void BlockHandler (OSTimePtr pTimeout, pointer pReadmask);
extern void ClientWakeup (ClientPtr client);
-extern void CopyISOLatin1Lowered (char *d, char *s, int length);
extern void InitBlockAndWakeupHandlers (void);
extern void NoopDDA (void);
extern void ProcessWorkQueue (void);
diff --git a/include/misc.h b/include/misc.h
index 79d4920..f0da949 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -115,7 +115,6 @@ in this Software without prior written authorization from The Open Group.
extern void NoopDDA(void);
extern char *NameForAtom(Atom atom);
#endif
-extern void BitOrderInvert(unsigned char *buf, int nbytes);
#define fsCat(x,y) x##_##y
diff --git a/os/xfstrans.c b/os/xfstrans.c
index 81cd91f..bb1b12a 100644
--- a/os/xfstrans.c
+++ b/os/xfstrans.c
@@ -89,8 +89,9 @@ TRANS(GetInetdListenInfo) (int fd)
*/
old_listen = malloc (sizeof (OldListenRec));
if (old_listen != NULL) {
+ char *old_port;
TRANS(GetReopenInfo)(inetdCI, &(old_listen->trans_id),
- &(old_listen->fd), &port);
+ &(old_listen->fd), &old_port);
old_listen->portnum = portnum;
}