handle missing return values
This commit is contained in:
@@ -601,16 +601,10 @@ _DtCmsSetCalendarAttrs4Parser(
|
||||
extern CSA_return_code
|
||||
_DtCmsRbToCsaStat(Rb_Status rb_stat)
|
||||
{
|
||||
switch (rb_stat) {
|
||||
case rb_ok:
|
||||
return (CSA_SUCCESS);
|
||||
case rb_duplicate:
|
||||
case rb_badtable:
|
||||
case rb_notable:
|
||||
case rb_failed:
|
||||
case rb_other:
|
||||
return (CSA_E_FAILURE);
|
||||
if (rb_stat == rb_ok) {
|
||||
return CSA_SUCCESS;
|
||||
}
|
||||
return CSA_E_FAILURE;
|
||||
}
|
||||
|
||||
extern void
|
||||
|
||||
@@ -173,6 +173,7 @@ ushort GetContentsType(void)
|
||||
return((ushort)CA_FT_CNTLONG);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
@@ -1303,6 +1303,7 @@ TblGetAlign(short col, /* column number */
|
||||
case Char: return 'd';
|
||||
case Span: return 's';
|
||||
}
|
||||
return 'l';
|
||||
}
|
||||
|
||||
/* TblGetWidth() -- get width spec, if any, for a entry
|
||||
|
||||
@@ -2159,7 +2159,7 @@ rename the file you are changing so it no longer has the same name.");
|
||||
} /* end switch (mode) */
|
||||
|
||||
} /* end switch (message) */
|
||||
|
||||
return "";
|
||||
} /* end getVariableMessage */
|
||||
|
||||
static Boolean
|
||||
|
||||
@@ -61,6 +61,17 @@
|
||||
static int flood_min_x, flood_min_y, flood_max_x, flood_max_y;
|
||||
|
||||
|
||||
static void Set_FloodLimits(int x, int y);
|
||||
static void Flood_Fill(
|
||||
XImage *color_image,
|
||||
XImage *mono_image,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
unsigned long new_pixel,
|
||||
unsigned long new_mono);
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Routine: Mirror_Image *
|
||||
@@ -76,7 +87,6 @@ int
|
||||
Mirror_Image(
|
||||
int orientation )
|
||||
{
|
||||
XRectangle tmp_box;
|
||||
XImage *new_image, *old_image, *new_mono, *old_mono;
|
||||
unsigned long n;
|
||||
int i, j;
|
||||
@@ -416,7 +426,7 @@ Flood_Region(
|
||||
* *
|
||||
*X11***********************************************************************/
|
||||
|
||||
void
|
||||
static void
|
||||
Set_FloodLimits(
|
||||
int x,
|
||||
int y )
|
||||
@@ -473,7 +483,7 @@ struct seg {short y, xl, xr, dy;};
|
||||
int local_debug=False, p_cnt;
|
||||
#endif
|
||||
|
||||
int
|
||||
static void
|
||||
Flood_Fill(
|
||||
XImage *color_image,
|
||||
XImage *mono_image,
|
||||
@@ -489,7 +499,7 @@ Flood_Fill(
|
||||
struct seg stack[MAX], *sp = stack;
|
||||
|
||||
old_pixel = XGetPixel(color_image, x, y); /* read pv at seed point */
|
||||
if (old_pixel==new_pixel || x<0 || x>width || y<0 || y>height) return 0;
|
||||
if (old_pixel==new_pixel || x<0 || x>width || y<0 || y>height) return;
|
||||
PUSH(y, x, x, 1); /* needed in some cases */
|
||||
PUSH(y+1, x, x, -1); /* seed segment (popped 1st) */
|
||||
|
||||
|
||||
@@ -28,5 +28,3 @@ int Mirror_Image(int orientation);
|
||||
int Block_Rotate(XImage *src_image, XImage *dst_image, int rtype);
|
||||
void Scale_Image(void);
|
||||
int Flood_Region(int flood_x, int flood_y);
|
||||
void Set_FloodLimits(int x, int y);
|
||||
int Flood_Fill(XImage *color_image, XImage *mono_image, int x, int y, int width, int height, unsigned long new_pixel, unsigned long new_mono);
|
||||
|
||||
@@ -848,7 +848,7 @@ extern int source(
|
||||
/******************************* socket.c **************************/
|
||||
|
||||
extern int AnyWellKnownSockets( void ) ;
|
||||
extern int CreateWellKnownSockets( void ) ;
|
||||
extern void CreateWellKnownSockets( void ) ;
|
||||
extern void DestroyWellKnownSockets( void ) ;
|
||||
extern char * NetworkAddressToHostname(
|
||||
#if NeedWidePrototypes
|
||||
|
||||
@@ -108,20 +108,20 @@ extern int WellKnownSocketsMax;
|
||||
void registerHostname (char *name, int namelen); // xdmcp.c
|
||||
|
||||
|
||||
int
|
||||
void
|
||||
CreateWellKnownSockets (void)
|
||||
{
|
||||
struct sockaddr_in sock_addr;
|
||||
char *name, *localHostname();
|
||||
|
||||
if (request_port == 0)
|
||||
return 0;
|
||||
return;
|
||||
Debug ("creating socket %d\n", request_port);
|
||||
xdmcpFd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
if (xdmcpFd == -1) {
|
||||
LogError (ReadCatalog(MC_LOG_SET,MC_LOG_FAIL_SOCK,MC_DEF_LOG_FAIL_SOCK),
|
||||
request_port);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
name = localHostname ();
|
||||
registerHostname (name, strlen (name));
|
||||
@@ -140,7 +140,7 @@ CreateWellKnownSockets (void)
|
||||
request_port, errno);
|
||||
close (xdmcpFd);
|
||||
xdmcpFd = -1;
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
WellKnownSocketsMax = xdmcpFd;
|
||||
FD_SET (xdmcpFd, &WellKnownSocketsMask);
|
||||
@@ -150,7 +150,7 @@ CreateWellKnownSockets (void)
|
||||
if (chooserFd == -1)
|
||||
{
|
||||
LogError ((unsigned char *)"chooser socket creation failed, errno %d\n", errno);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
listen (chooserFd, 5);
|
||||
if (chooserFd > WellKnownSocketsMax)
|
||||
|
||||
@@ -1738,7 +1738,9 @@ HostCB(Tt_message m, Tt_pattern p)
|
||||
if (state == TT_HANDLED) {
|
||||
value = tt_message_arg_val(m, 1);
|
||||
waitCB = 0;
|
||||
return TT_CALLBACK_PROCESSED;
|
||||
}
|
||||
return TT_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
||||
@@ -1654,14 +1654,12 @@ const char* PdmOidNotifyString(PdmOidNotify notify)
|
||||
{
|
||||
case PDMOID_NOTIFY_UNSUPPORTED:
|
||||
return (const char*)NULL;
|
||||
break;
|
||||
case PDMOID_NOTIFY_NONE:
|
||||
return NOTIFY_NONE_STR;
|
||||
break;
|
||||
case PDMOID_NOTIFY_EMAIL:
|
||||
return NOTIFY_EMAIL_STR;
|
||||
break;
|
||||
}
|
||||
return (const char*)NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -2049,6 +2049,7 @@ QueryGeometry(
|
||||
desired->width = 1;
|
||||
if (desired->height == 0)
|
||||
desired->height = 1;
|
||||
return XtGeometryYes;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1409,8 +1409,7 @@ max(
|
||||
if(y >= z && y >= x)
|
||||
return(y);
|
||||
|
||||
if(z >= y && z >= x)
|
||||
return(z);
|
||||
return(z);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -1429,8 +1428,7 @@ min(
|
||||
if(y <= z && y <= x)
|
||||
return(y);
|
||||
|
||||
if(z <= y && z <= x)
|
||||
return(z);
|
||||
return(z);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user