1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-02 22:25:48 +01:00

eliminated gcc-4 compilation warnings

This commit is contained in:
dan
2005-08-22 23:58:19 +00:00
parent 91f5abc955
commit c0317ddae5
28 changed files with 143 additions and 117 deletions

View File

@@ -126,8 +126,8 @@ enqueueMessage(WMConnection *cPtr, char *message)
}
static unsigned char*
findDelimiter(unsigned char *data, unsigned const char *endPtr)
static char*
findDelimiter(char *data, const char *endPtr)
{
wassertrv(data < endPtr, NULL);

View File

@@ -201,7 +201,7 @@ inputHandler(int fd, int mask, void *clientData)
if (cPtr->state == WCInProgress) {
Bool failed;
int len = sizeof(result);
socklen_t len = sizeof(result);
WCErrorCode = 0;
if (getsockopt(cPtr->sock, SOL_SOCKET, SO_ERROR,
@@ -462,8 +462,8 @@ WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol)
{
WMConnection *cPtr;
struct sockaddr_in *socketaddr;
socklen_t size;
int sock, on;
int size;
WCErrorCode = 0;
@@ -678,7 +678,7 @@ WMConnection*
WMAcceptConnection(WMConnection *listener)
{
struct sockaddr_in clientname;
int size;
socklen_t size;
int newSock;
WMConnection *newConnection;

View File

@@ -219,7 +219,7 @@ sourceOperationList(WMScreen *scr, Window sourceWin)
}
operationArray = WMCreateDragOperationArray(count);
description = descriptionList;
description = (char*)descriptionList;
for (i=0; count > 0; i++) {
size = strlen(description);

View File

@@ -279,7 +279,7 @@ getSelectionData(Display *dpy, Window win, Atom where)
WMData *wdata;
unsigned char *data;
Atom rtype;
unsigned bits, bpi;
int bits, bpi;
unsigned long len, bytes;

View File

@@ -7,12 +7,12 @@
#define LIGHT_STIPPLE_WIDTH 4
#define LIGHT_STIPPLE_HEIGHT 4
static unsigned char LIGHT_STIPPLE_BITS[] = {
static char LIGHT_STIPPLE_BITS[] = {
0x05, 0x0a, 0x05, 0x0a};
#define DARK_STIPPLE_WIDTH 4
#define DARK_STIPPLE_HEIGHT 4
static unsigned char DARK_STIPPLE_BITS[] = {
static char DARK_STIPPLE_BITS[] = {
0x0a, 0x04, 0x0a, 0x01};

View File

@@ -27,7 +27,7 @@ xlfdToFcPattern(char *xlfd)
/* Just skip old font names that contain %d in them.
* We don't support that anymore. */
if (strchr(xlfd, '%')!=NULL)
return FcNameParse(DEFAULT_FONT);
return FcNameParse((FcChar8*)DEFAULT_FONT);
fname= wstrdup(xlfd);
if ((ptr = strchr(fname, ','))) {
@@ -38,7 +38,7 @@ xlfdToFcPattern(char *xlfd)
if (!pattern) {
wwarning(_("invalid font: %s. Trying '%s'"), xlfd, DEFAULT_FONT);
pattern = FcNameParse(DEFAULT_FONT);
pattern = FcNameParse((FcChar8*)DEFAULT_FONT);
}
return pattern;
@@ -52,7 +52,7 @@ xlfdToFcName(char *xlfd)
char *fname;
pattern = xlfdToFcPattern(xlfd);
fname = FcNameUnparse(pattern);
fname = (char*)FcNameUnparse(pattern);
FcPatternDestroy(pattern);
return fname;
@@ -102,7 +102,7 @@ makeFontOfSize(char *font, int size, char *fallback)
if (font[0]=='-') {
pattern = xlfdToFcPattern(font);
} else {
pattern = FcNameParse(font);
pattern = FcNameParse((FcChar8*)font);
}
/*FcPatternPrint(pattern);*/
@@ -116,12 +116,12 @@ makeFontOfSize(char *font, int size, char *fallback)
}
if (fallback && !hasPropertyWithStringValue(pattern, FC_FAMILY, fallback)) {
FcPatternAddString(pattern, FC_FAMILY, fallback);
FcPatternAddString(pattern, FC_FAMILY, (FcChar8*)fallback);
}
/*FcPatternPrint(pattern);*/
result = FcNameUnparse(pattern);
result = (char*)FcNameUnparse(pattern);
FcPatternDestroy(pattern);
return result;
@@ -366,7 +366,7 @@ WMCopyFontWithStyle(WMScreen *scrPtr, WMFont *font, WMFontStyle style)
* return the closest match font to what we requested which is the
* oblique font. Same goes for using bold for weight.
*/
pattern = FcNameParse(WMGetFontName(font));
pattern = FcNameParse((FcChar8*)WMGetFontName(font));
switch (style) {
case WFSNormal:
FcPatternDel(pattern, FC_WEIGHT);
@@ -374,21 +374,21 @@ WMCopyFontWithStyle(WMScreen *scrPtr, WMFont *font, WMFontStyle style)
break;
case WFSBold:
FcPatternDel(pattern, FC_WEIGHT);
FcPatternAddString(pattern, FC_WEIGHT, "bold");
FcPatternAddString(pattern, FC_WEIGHT, (FcChar8*)"bold");
break;
case WFSItalic:
FcPatternDel(pattern, FC_SLANT);
FcPatternAddString(pattern, FC_SLANT, "italic");
FcPatternAddString(pattern, FC_SLANT, (FcChar8*)"italic");
break;
case WFSBoldItalic:
FcPatternDel(pattern, FC_WEIGHT);
FcPatternDel(pattern, FC_SLANT);
FcPatternAddString(pattern, FC_WEIGHT, "bold");
FcPatternAddString(pattern, FC_SLANT, "italic");
FcPatternAddString(pattern, FC_WEIGHT, (FcChar8*)"bold");
FcPatternAddString(pattern, FC_SLANT, (FcChar8*)"italic");
break;
}
name = FcNameUnparse(pattern);
name = (char*)FcNameUnparse(pattern);
copy = WMCreateFont(scrPtr, name);
FcPatternDestroy(pattern);
wfree(name);

View File

@@ -83,7 +83,7 @@ static int scalableFontSizes[] = {
static void setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size);
static void setFontPanelFontName(FontPanel *panel, char *family, char *style, double size);
static int isXLFD(char *font, int *length_ret);
@@ -370,7 +370,7 @@ WMSetFontPanelFont(WMFontPanel *panel, char *fontName)
if (!isXLFD(fontName, &fname_len)) {
/* maybe its proper fontconfig and we can parse it */
pattern = FcNameParse(fontName);
pattern = FcNameParse((FcChar8*)fontName);
} else {
/* maybe its proper xlfd and we can convert it to an FcPattern */
pattern = XftXlfdParse(fontName, False, False);
@@ -383,7 +383,7 @@ WMSetFontPanelFont(WMFontPanel *panel, char *fontName)
if (FcPatternGetString(pattern, FC_FAMILY, 0, &family)==FcResultMatch)
if (FcPatternGetString(pattern, FC_STYLE, 0, &style)==FcResultMatch)
if (FcPatternGetDouble(pattern, "pixelsize", 0, &size)==FcResultMatch)
setFontPanelFontName(panel, family, style, size);
setFontPanelFontName(panel, (char*)family, (char*)style, size);
FcPatternDestroy(pattern);
}
@@ -603,7 +603,7 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
if (FcPatternGetString(fs->fonts[i],FC_FAMILY,0,&family)==FcResultMatch)
if (FcPatternGetString(fs->fonts[i],FC_STYLE,0,&style)==FcResultMatch)
addFontToXftFamily(families, family, style);
addFontToXftFamily(families, (char*)family, (char*)style);
}
FcFontSetDestroy(fs);
}
@@ -815,7 +815,7 @@ sizeClick(WMWidget *w, void *data)
static void
setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size)
setFontPanelFontName(FontPanel *panel, char *family, char *style, double size)
{
int famrow;
int stlrow;

View File

@@ -305,7 +305,7 @@ static char *CHECK_MARK[] = {
#define STIPPLE_WIDTH 8
#define STIPPLE_HEIGHT 8
static unsigned char STIPPLE_BITS[] = {
static char STIPPLE_BITS[] = {
0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55
};

View File

@@ -207,7 +207,7 @@ output(char *ptr, int len)
#define STIPPLE_WIDTH 8
#define STIPPLE_HEIGHT 8
static unsigned char STIPPLE_BITS[] = {
static char STIPPLE_BITS[] = {
0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
};

View File

@@ -715,7 +715,8 @@ WMGetViewScreenPosition(WMView *view)
{
WMScreen *scr = W_VIEW_SCREEN(view);
Window foo;
int x, y, topX, topY, bar;
int x, y, topX, topY;
unsigned int bar;
WMView *topView;
topView = view;