mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix BSD and Sun problems after coverity fixes
This commit is contained in:
parent
15fb8cea03
commit
16fbb15ecc
12 changed files with 31 additions and 16 deletions
|
@ -178,9 +178,12 @@ XCOMM Gnu C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
|
|||
#ifndef CplusplusLibC
|
||||
#define CplusplusLibC -L/opt/solarisstudio/lib -lCrun
|
||||
#endif
|
||||
#ifndef OptimizedCplusplusDebugFlags
|
||||
# define OptimizedCplusplusDebugFlags -O2 -erroff=attrskipunsup
|
||||
#endif
|
||||
#ifndef CplusplusDependIncludes
|
||||
#if CplusplusCompilerMajorVersion > 3
|
||||
# define CplusplusDependIncludes -I/opt/solarisstudio/prod/include/CC -I/opt/solarisstudio/prod/include/CC/Cstd
|
||||
# define CplusplusDependIncludes -I/opt/solarisstudio/prod/include/CC -I/opt/solarisstudio/prod/include/CC/Cstd -I/opt/solarisstudio/prod/include/CC/std
|
||||
#elif CplusplusCompilerMajorVersion > 2
|
||||
# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
|
||||
#else
|
||||
|
|
|
@ -554,7 +554,6 @@ esc_P_table[] =
|
|||
{ '0', '9', &_DtTermStateP, _DtTermEnterNum, /* enter number */ },
|
||||
{ '|', '|', &_DtTermStateUserKey, _DtTermParseUserKeyClear, /* DECUDK */ },
|
||||
{ '{', '{', &_DtTermStateDLCharSet, _DtTermPrimParserNextState, },
|
||||
{ /* down-line-load char set */ },
|
||||
{ 0x00, 0xFF, &stateStart , _DtTermPrintState /* end of table */ },
|
||||
};
|
||||
StateTableRec _DtTermStateP = {False, esc_P_table, pre_parse_table};
|
||||
|
|
|
@ -91,9 +91,13 @@ _Tt_rpc_client(int conn_socket)
|
|||
_program = 0;
|
||||
_version = 0;
|
||||
_server_uid = 0;
|
||||
_clnt_stat = NULL;
|
||||
_clnt_stat = RPC_SUCCESS;
|
||||
#if defined(OPT_TLI)
|
||||
_server_addr = 0;
|
||||
#else
|
||||
_server_addr.sin_family = 0;
|
||||
_server_addr.sin_port = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ _Tt_observer()
|
|||
_reliability = TT_DISCARD;
|
||||
_opnum = -1;
|
||||
|
||||
_scope = NULL;
|
||||
_scope = TT_SCOPE_NONE;
|
||||
_state = TT_STATE_LAST; // BUG This class member is not set anywhere, but a getter function exists
|
||||
}
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ config_attachment(
|
|||
attachment = &(obj->attachments->south);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
return OK;
|
||||
}
|
||||
if (attachment->type == AB_ATTACH_OBJ)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#if defined(sun)
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
#include "calctool.h"
|
||||
|
||||
extern char *base_str[] ; /* Strings for each base value. */
|
||||
|
@ -1729,13 +1732,13 @@ do_round(double result, int ndigits)
|
|||
int temp;
|
||||
|
||||
if (isnan(result)) return result;
|
||||
#if defined(_AIX) || defined(__aix) || defined(__sparc)
|
||||
#if defined(_AIX) || defined(__aix) || defined(sun)
|
||||
temp = finite(result);
|
||||
if (!temp)
|
||||
return (temp > 0) ? HUGE : -HUGE;
|
||||
#else
|
||||
if ((temp = isinf(result))) return (temp > 0) ? HUGE : -HUGE;
|
||||
#endif /* _AIX or sparc*/
|
||||
#endif /* _AIX or sun */
|
||||
|
||||
if (ndigits >= 0 && ndigits < MAX_DIGITS)
|
||||
{
|
||||
|
@ -1843,13 +1846,13 @@ try_compute_i(double guess, double *result, int method)
|
|||
|
||||
new_w = w - f / f_prime;
|
||||
|
||||
#if defined(_AIX) || defined(__aix) || defined(__sparc)
|
||||
#if defined(_AIX) || defined(__aix) || defined(sun)
|
||||
if (!(!isnan(new_w) && finite(new_w)))
|
||||
return FALSE;
|
||||
#else
|
||||
if (!(!isnan(new_w) && !isinf(new_w)))
|
||||
return FALSE;
|
||||
#endif /* _AIX or sparc */
|
||||
#endif /* _AIX or sun */
|
||||
|
||||
if (new_w == w || (w != 0.0 && fabs((new_w - w) / w) < FIN_EPSILON))
|
||||
break;
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#include <dirent.h>
|
||||
#include <sys/file.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "fsrtns.h"
|
||||
|
||||
|
||||
|
|
|
@ -77,11 +77,15 @@ btree::btree(const char* store_name)
|
|||
|
||||
btree::~btree()
|
||||
{
|
||||
if ( btree_DB->sync(btree_DB, 0) == RET_ERROR )
|
||||
throw(stringException("btree sync failed"));
|
||||
if ( btree_DB->sync(btree_DB, 0) == RET_ERROR ) {
|
||||
cerr << "btree sync failed";
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
if ( btree_DB->close(btree_DB) == RET_ERROR )
|
||||
throw(stringException("btree close failed"));
|
||||
if ( btree_DB->close(btree_DB) == RET_ERROR ) {
|
||||
cerr << "btree close failed";
|
||||
std::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void btree::clean()
|
||||
|
|
|
@ -68,6 +68,8 @@
|
|||
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "dstr/index_agent.h"
|
||||
#include "btree_berkeley/db.h"
|
||||
|
||||
|
|
|
@ -420,7 +420,6 @@ typedef Stack<NTerminal*> _stkNTPtr_;
|
|||
/* Basic subdir refs */
|
||||
typedef CC_TPtrDlist<sr_DtCvSegment> _ccTPtrDLstCvSegmnt_;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(sun) | defined(hpux)
|
||||
|
|
|
@ -1910,7 +1910,7 @@ RunGreeter( struct display *d, struct greet_info *greet,
|
|||
char *p;
|
||||
char **env;
|
||||
char *path;
|
||||
struct greet_state state = {};
|
||||
struct greet_state state;
|
||||
int notify_dt;
|
||||
int dupfp = -1;
|
||||
int dupfp2 = -1;
|
||||
|
|
|
@ -226,7 +226,7 @@ int main(int argc, XeString *argv)
|
|||
/* Open an error log with whatever name the library wants to use */
|
||||
SPC_Open_Log(log_path, FALSE);
|
||||
SPC_Print_Protocol = spc_logF;
|
||||
if(NULL == (stderr = freopen(log_path, "a", stderr))) {
|
||||
if(NULL == freopen(log_path, "a", stderr)) {
|
||||
printf("Unable to reopen '%s' as stderr\n", log_path);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue