本文整理汇总了C++中UNREFERENCED函数的典型用法代码示例。如果您正苦于以下问题:C++ UNREFERENCED函数的具体用法?C++ UNREFERENCED怎么用?C++ UNREFERENCED使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UNREFERENCED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unix_socket
int unix_socket (char* path)
{
#if !defined( HAVE_SYS_UN_H )
UNREFERENCED(path);
WRMSG (HHC01032, "E");
return -1;
#else // defined( HAVE_SYS_UN_H )
struct sockaddr_un addr;
int sd;
logdebug ("unix_socket(%s)\n", path);
if (strlen (path) > sizeof(addr.sun_path) - 1)
{
WRMSG (HHC01033, "E", path, (int) sizeof(addr.sun_path) - 1);
return -1;
}
addr.sun_family = AF_UNIX;
strlcpy( addr.sun_path, path,sizeof(addr.sun_path) ); /* guaranteed room by above check */
sd = socket (PF_UNIX, SOCK_STREAM, 0);
if (sd == -1)
{
WRMSG (HHC01034, "E", "socket()", strerror(HSO_errno));
return -1;
}
unlink (path);
fchmod (sd, 0700);
if (0
|| bind (sd, (struct sockaddr*) &addr, sizeof(addr)) == -1
|| listen (sd, 0) == -1
)
{
WRMSG (HHC01034, "E", "bind()", strerror(HSO_errno));
return -1;
}
return sd;
#endif // !defined( HAVE_SYS_UN_H )
}
示例2: mpc_point_pus
/* the first MPC_PUS of the required type will ever be returned. */
DLL_EXPORT MPC_PUS* mpc_point_pus( DEVBLK* pDEVBLK, MPC_PUK* pMPC_PUK, BYTE bType )
{
MPC_PUS* pMPC_PUS;
int iTotLenPUS;
U16 uTotLenPUS;
U16 uLenPUS;
U16 uLenPUK;
UNREFERENCED( pDEVBLK );
/* Get the length of the MPC_PUK, the total length of the */
/* following MPC_PUSs, then point to the first MPC_PUS. */
FETCH_HW( uLenPUK, pMPC_PUK->length );
FETCH_HW( uTotLenPUS, pMPC_PUK->lenpus );
iTotLenPUS = uTotLenPUS;
pMPC_PUS = (MPC_PUS*)((BYTE*)pMPC_PUK + uLenPUK);
/* Find the required MPC_PUS. */
while( iTotLenPUS > 0 )
{
/* Ensure there are at least the first 4-bytes of an MPC_PUS. */
if( iTotLenPUS < 4 )
return NULL;
/* Get the length of the MPC_PUS. */
FETCH_HW( uLenPUS, pMPC_PUS->length );
if( uLenPUS == 0 ) /* Better safe than sorry */
return NULL;
/* Ensure there is the whole of the MPC_PUS. */
if( iTotLenPUS < uLenPUS )
return NULL;
/* Check for the required MPC_PUS. */
if( pMPC_PUS->type == bType )
return pMPC_PUS;
/* Point to the next MPC_PUS. */
pMPC_PUS = (MPC_PUS*)((BYTE*)pMPC_PUS + uLenPUS);
iTotLenPUS -= uLenPUS;
}
return NULL;
} /* End function mpc_point_pus() */
示例3: WF_OPENSSL
WF_OPENSSL(void, setSSLVerify)(JNIEnv *e, jobject o, jlong ssl, jint level, jint depth)
{
#pragma comment(linker, "/EXPORT:"__FUNCTION__"="__FUNCDNAME__)
tcn_ssl_ctxt_t *c;
int verify;
SSL *ssl_ = J2P(ssl, SSL *);
if (ssl_ == NULL) {
throwIllegalStateException(e, "ssl is null");
return;
}
c = SSL_get_app_data2(ssl_);
verify = SSL_VERIFY_NONE;
UNREFERENCED(o);
c->verify_mode = level;
if (c->verify_mode == SSL_CVERIFY_UNSET)
c->verify_mode = SSL_CVERIFY_NONE;
if (depth > 0)
c->verify_depth = depth;
/*
* Configure callbacks for SSL context
*/
if (c->verify_mode == SSL_CVERIFY_REQUIRE)
verify |= SSL_VERIFY_PEER_STRICT;
if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
(c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
verify |= SSL_VERIFY_PEER;
if (!c->store) {
if (ssl_methods.SSL_CTX_set_default_verify_paths(c->ctx)) {
c->store = ssl_methods.SSL_CTX_get_cert_store(c->ctx);
crypto_methods.X509_STORE_set_flags(c->store, 0);
}
else {
/* XXX: See if this is fatal */
}
}
ssl_methods.SSL_set_verify(ssl_, verify, SSL_callback_SSL_verify);
}
示例4: MNetUserModalsSet
APIERR MNetUserModalsSet(
const TCHAR FAR * pszServer,
UINT Level,
BYTE FAR * pbBuffer,
UINT cbBuffer,
UINT ParmNum )
{
UNREFERENCED( cbBuffer );
if( ParmNum != PARMNUM_ALL )
{
return ERROR_NOT_SUPPORTED;
}
return (APIERR)NetUserModalsSet( (TCHAR *)pszServer,
Level,
pbBuffer,
NULL );
} // MNetUserModalsSet
示例5: delayed_exit
/*-------------------------------------------------------------------*/
static void delayed_exit (int exit_code)
{
UNREFERENCED(exit_code);
/* Delay exiting is to give the system
* time to display the error message. */
#if defined( _MSVC_ )
SetConsoleCtrlHandler( NULL, FALSE); // disable Ctrl-C intercept
#endif
sysblk.shutimmed = TRUE;
fflush(stderr);
fflush(stdout);
usleep(100000);
do_shutdown();
fflush(stderr);
fflush(stdout);
usleep(100000);
return;
}
示例6: mpc_point_puk
/*--------------------------------------------------------------------*/
DLL_EXPORT MPC_PUK* mpc_point_puk( DEVBLK* pDEVBLK, MPC_TH* pMPC_TH, MPC_RRH* pMPC_RRH )
{
MPC_PH* pMPC_PH;
MPC_PUK* pMPC_PUK;
U32 uOffData;
U16 uOffPH;
UNREFERENCED( pDEVBLK );
// Point to the MPC_PH.
FETCH_HW( uOffPH, pMPC_RRH->offph );
pMPC_PH = (MPC_PH*)((BYTE*)pMPC_RRH + uOffPH);
// Get the length of and point to the data referenced by the
// MPC_PH. The data contain a MPC_PUK and one or more MPC_PUSs.
FETCH_FW( uOffData, pMPC_PH->offdata );
pMPC_PUK = (MPC_PUK*)((BYTE*)pMPC_TH + uOffData);
return pMPC_PUK;
} /* End function mpc_point_puk() */
示例7: status
/*-------------------------------------------------------------------*/
void status (int i, int n)
{
#ifdef EXTERNALGUI
if (extgui)
{
UNREFERENCED( n );
if (i % 100)
return;
EXTGUIMSG( "TRK=%d\n", i );
return;
}
else
#endif /*EXTERNALGUI*/
{
static char indic[] = "|/-\\";
// if (i % 101 != 1)
// return;
printf ("\r%c %3d%% %7d", indic[i%4], (int)((i*100.0)/n), i);
}
} /* end function status */
示例8: Java_es_bsc_cepbatools_extrae_Wrapper_nEvent
JNIEXPORT void JNICALL Java_es_bsc_cepbatools_extrae_Wrapper_nEvent (JNIEnv *env,
jclass jc, jintArray types, jlongArray values)
{
jint countTypes = 0;
jint countValues = 0;
UNREFERENCED(jc);
jint *typesArray = (*env)->GetIntArrayElements(env, types, NULL);
jlong *valuesArray = (*env)->GetLongArrayElements(env, values, NULL);
if (typesArray != NULL && valuesArray != NULL)
{
countTypes = (*env)->GetArrayLength(env, types);
countValues = (*env)->GetArrayLength(env, values);
if (countTypes == countValues)
Extrae_nevent (countTypes, (extrae_type_t *)typesArray, (extrae_value_t *)valuesArray);
(*env)->ReleaseIntArrayElements(env, types, typesArray, JNI_ABORT);
(*env)->ReleaseLongArrayElements(env, values, valuesArray, JNI_ABORT);
}
}
示例9: coretemp_update_control_state
/** Triggered by eventset operations like add or remove */
int coretemp_update_control_state( hwd_control_state_t * ptr,
NativeInfo_t * native, int count, hwd_context_t * ctx )
{
int i, index;
coretemp_control_state_t *c = (coretemp_control_state_t *) ptr;
UNREFERENCED(ctx);
SUBDBG("coretemp_update_control_state %p %p...\n", ptr, ctx);
for (i = 0; i < count; i++)
{
index = native[i].ni_event & PAPI_NATIVE_AND_MASK & PAPI_COMPONENT_AND_MASK;
native[i].ni_position = coretemp_native_table[index].resources.selector - 1;
c->added[native[i].ni_position] = TRUE;
SUBDBG ("\nnative[%i].ni_position = coretemp_native_table[%i].resources.selector-1 = %i;\n",
i, index, native[i].ni_position );
}
return PAPI_OK;
}
示例10: handleBubbleHelp
/* Callback for bubble help events */
void handleBubbleHelp(Widget w, XtPointer clientData, XEvent *event,
Boolean *ctd)
{
/* Avoid compiler warning messages */
UNREFERENCED(ctd);
/* Switch depending on type */
switch (event->type) {
case EnterNotify:
/* Manage the bubble help widget*/
makeBubbleHelpWidget(w,(char *)clientData);
break;
case LeaveNotify:
/* Destroy the bubble help widget*/
if(bubbleHelpWidget) {
XtDestroyWidget(bubbleHelpWidget);
bubbleHelpWidget=NULL;
}
break;
}
}
示例11: MNetServerSetInfo
APIERR MNetServerSetInfo(
const TCHAR FAR * pszServer,
UINT Level,
BYTE FAR * pbBuffer,
UINT cbBuffer,
UINT ParmNum )
{
UNREFERENCED( cbBuffer );
// mapping layer does not do this right now, since UI never uses it.
if( ParmNum != PARMNUM_ALL )
{
return ERROR_NOT_SUPPORTED;
}
return (APIERR)NetServerSetInfo( (TCHAR *)pszServer,
Level,
pbBuffer,
NULL );
} // MNetServerSetInfo
示例12: MNetRemoteMove
APIERR MNetRemoteMove(
const TCHAR FAR * pszSourcePath,
const TCHAR FAR * pszDestPath,
const TCHAR FAR * pszSourcePasswd,
const TCHAR FAR * pszDestPasswd,
UINT fOpen,
UINT fCopy,
BYTE FAR ** ppbBuffer )
{
UNREFERENCED( pszSourcePath );
UNREFERENCED( pszDestPath );
UNREFERENCED( pszSourcePasswd );
UNREFERENCED( pszDestPasswd );
UNREFERENCED( fOpen );
UNREFERENCED( fCopy );
UNREFERENCED( ppbBuffer );
return ERROR_NOT_SUPPORTED; // NOT NEEDED FOR LMOBJ
} // MNetRemoteMove
示例13: MNetServerAdminCommand
APIERR MNetServerAdminCommand(
const TCHAR FAR * pszServer,
const TCHAR FAR * pszCommand,
UINT FAR * pResult,
BYTE FAR * pbBuffer,
UINT cbBuffer,
UINT FAR * pcbReturned,
UINT FAR * pcbTotalAvail )
{
UNREFERENCED( pszServer );
UNREFERENCED( pszCommand );
UNREFERENCED( pResult );
UNREFERENCED( pbBuffer );
UNREFERENCED( cbBuffer );
UNREFERENCED( pcbReturned );
UNREFERENCED( pcbTotalAvail );
return ERROR_NOT_SUPPORTED; // NOT NEEDED FOR LMOBJ
} // MNetServerAdminCommand
示例14: process_rc_file
/*-------------------------------------------------------------------*/
static char *rcname = NULL; /* hercules.rc name pointer */
static void* process_rc_file (void* dummy)
{
int is_default_rc = 0; /* 1 == default name used */
char pathname[MAX_PATH]; /* (work) */
UNREFERENCED(dummy);
/* Obtain the name of the hercules.rc file or default */
if (!rcname)
{
if (!(rcname = getenv("HERCULES_RC")))
{
rcname = "hercules.rc";
is_default_rc = 1;
}
}
if(!strcasecmp(rcname,"None"))
return NULL;
hostpath(pathname, rcname, sizeof(pathname));
/* Wait for panel thread to engage */
// ZZ FIXME:THIS NEED TO GO
while (!sysblk.panel_init)
usleep( 10 * 1000 );
/* Run the script processor for this file */
if (process_script_file(pathname,1) != 0)
if (ENOENT == errno)
if (!is_default_rc)
WRMSG(HHC01405, "E", pathname);
// (else error message already issued)
return NULL;
}
示例15: get_console_dim
int get_console_dim( FILE* confp, int* rows, int* cols )
{
char* env;
#if defined(TIOCGWINSZ)
struct winsize winsize;
#else
UNREFERENCED( confp );
#endif
if ( !rows || !cols )
{
errno = EINVAL;
return -1;
}
#if defined(TIOCGWINSZ)
if (ioctl(fileno(confp), TIOCGWINSZ, &winsize) >= 0)
{
*rows = winsize.ws_row;
*cols = winsize.ws_col;
}
else
#endif
{
if (!(env = getenv( "LINES" ))) *rows = 24;
else *rows = atoi(env);
if (!(env = getenv( "COLUMNS" ))) *cols = 80;
else *cols = atoi(env);
}
if (!*rows || !*cols)
{
errno = EIO;
return -1;
}
return 0;
}