当前位置: 首页>>代码示例>>C++>>正文


C++ NOT_USED函数代码示例

本文整理汇总了C++中NOT_USED函数的典型用法代码示例。如果您正苦于以下问题:C++ NOT_USED函数的具体用法?C++ NOT_USED怎么用?C++ NOT_USED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NOT_USED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: patricia__node_show_viz_rank

/* rank the nodes */
static error patricia__node_show_viz_rank(patricia__node_t *n, int level, void *opaque)
{
  patricia__show_viz_args_t *args = opaque;

  NOT_USED(level);

  if (n->bit == args->rank)
    (void) fprintf(args->f, "\t\t\"%p\"\n", (void *) n);

  return error_OK;
}
开发者ID:Dinesh-Ramakrishnan,项目名称:Containers,代码行数:12,代码来源:show-viz.c

示例2: do_parse_widget

/**
 * parse each widget
 *
 * @param w: pointer to widget
 * @param m: no use
 * @return: NULL
 **/
static struct widget* do_parse_widget(struct widget* w, union message* m)
{
    NOT_USED(m);
    /**
     * record focusable widget
     **/
    if(w->input_enable == 1)
    {
        list_push_back(&global_application.focus_list, &w, sizeof(w));
    }

    /**
     * register window and update active window
     **/
    if(w->is_window)
    {
        struct window* parent = (struct window*)object_parent(OBJECT_POINTER(w));
		struct window* window_ptr = WINDOW_POINTER(w);
		si_t parent_descriptor = (parent == NULL ? 0 : parent->descriptor);
		si_t window_descriptor = register_window(parent_descriptor, window_ptr->title, 
				window_ptr->area.x, window_ptr->area.y, window_ptr->area.width, window_ptr->area.height, 
				window_ptr->minimize_enable, window_ptr->maximize_enable, window_ptr->modal);
		if(0 == window_descriptor)
		{
			EGUI_PRINT_ERROR("failed to register window %s", window_ptr->title);
			return NULL;
		}
		window_ptr->descriptor = window_descriptor;
        global_application.focus = window_ptr;

        /**
         * find icon for the application
         **/
        if((window_ptr->icon_path = (char*)malloc(256)) == NULL)
        {
			EGUI_PRINT_ERROR("failed to register window");
			return NULL;
        }
        else
        {
            /**
             * in C89 standard, snprintf() is NOT included in <stdio.h>
             * so you have to use sprintf, which may be dangerous. be careful
             **/
            sprintf(window_ptr->icon_path, "%s/icons/%s.bmp", global_application.icon_root_path, global_application.name);
            if(access(window_ptr->icon_path, R_OK) == -1)
            {
                sprintf(window_ptr->icon_path, "%s/icons/default.bmp", global_application.icon_root_path);
            }
        }
    }

    return NULL;
}
开发者ID:FangKuangKuang,项目名称:egui,代码行数:61,代码来源:exec.c

示例3: port

/*JSON{  "type":"method", "class": "Serial", "name" : "println",
         "description" : "Print a line to the serial port (newline character sent are '\r\n')",
         "generate" : "jswrap_serial_println",
         "params" : [ [ "string", "JsVar", "A String to print"] ]
}*/
void _jswrap_serial_print(JsVar *parent, JsVar *str, bool newLine) {
  NOT_USED(parent);
  IOEventFlags device = jsiGetDeviceFromClass(parent);
  str = jsvAsString(str, false);
  jsiTransmitStringVar(device,str);
  jsvUnLock(str);
  if (newLine) {
    jshTransmit(device, (unsigned char)'\r');
    jshTransmit(device, (unsigned char)'\n');
  }
}
开发者ID:AdrianHuang,项目名称:rt-thread-for-vmm,代码行数:16,代码来源:jswrap_serial.c

示例4: comm_ioctl

static
LONG
CDECL
comm_ioctl(FILEPTR * f,
           WORD      mode,
           void *    buf)
{
  NOT_USED(f);
  
  TRACE("srv_comm_device: ioctl");
  return 0;
}
开发者ID:e8johan,项目名称:oaesis,代码行数:12,代码来源:srv_comm_device.c

示例5: ref_count_inc

direntry_t *direntry_copy (CALLER_DECL direntry_t *de)
{
    unsigned refc = ref_count_inc( BASE_CLASS(de)->ref_count );


    NOT_USED(refc);
    direntry_trace("[direntry %p inode %lu] copy (" CALLER_FORMAT ") ref %u\n",
                   de, de->inode, CALLER_PASS refc);


    return de;
}
开发者ID:mt-inside,项目名称:fsfuse,代码行数:12,代码来源:direntry.c

示例6: comm_unselect

static
LONG
CDECL
comm_unselect(FILEPTR * f,
              LONG      p,
              WORD      mode)
{
  NOT_USED(f);
  TRACE("srv_comm_device: unselect");

  return 0;
}
开发者ID:e8johan,项目名称:oaesis,代码行数:12,代码来源:srv_comm_device.c

示例7: DHCP

/*JSON{
  "type" : "method",
  "class" : "ESPWifi",
  "name" : "setIP",
  "generate" : "jswrap_esp8266_setIP",
  "params" : [
    ["options","JsVar","Object containing IP address options `{ ip : '1,2,3,4', subnet, gateway, dns  }`, or do not supply an object in otder to force DHCP."]
  ],
  "return" : ["bool","True on success"]
}
Set the current IP address for get an IP from DHCP (if no options object is specified)
*/
bool jswrap_esp8266_setIP(JsVar *wlanObj, JsVar *options) {
  NOT_USED(wlanObj);

  if (networkState != NETWORKSTATE_ONLINE) {
    jsError("Not connected to the internet");
    return false;
  }

  bool success = false;

  return success;
}
开发者ID:ARMinARM,项目名称:Espruino,代码行数:24,代码来源:jswrap_esp8266.c

示例8: adjust_bobs

static error adjust_bobs(filerwin    *fw,
                         int          x,
                         int          y,
                         int          c,
                         unsigned int flags,
                         void        *opaque)
{
  os_box b;

  NOT_USED(x);
  NOT_USED(y);
  NOT_USED(flags);
  NOT_USED(opaque);

  bitvec_toggle(fw->selection, c);

  index_to_area(fw, c, &b);
  wimp_force_redraw(fw->w, b.x0, b.y0, b.x1, b.y1);

  return error_OK;
}
开发者ID:dpt,项目名称:PrivateEye,代码行数:21,代码来源:filerwin.c

示例9: get_dimensions_walk

static error get_dimensions_walk(treeview_t     *tr,
                                 int             depth,
                                 int             x,
                                 int             y,
                                 ntree_t        *t,
                                 connector_flags flags,
                                 int             index,
                                 txtfmt_t       *tx,
                                 int             height,
                                 void           *opaque)
{
  treeview_get_dimensions_data *data = opaque;
  int                           width;

  NOT_USED(tr);
  NOT_USED(y);
  NOT_USED(t);
  NOT_USED(flags);
  NOT_USED(index);
  NOT_USED(height);

  width = x;
  width += (depth + 1) * tr->line_height;
  width += 16 * txtfmt_get_wrapped_width(tx);
  width += 16; /* add another character's worth of space to allow for Wimp
                  text padding */
  if (width > data->width)
    data->width = width;

  return error_OK;
}
开发者ID:dpt,项目名称:PrivateEye,代码行数:31,代码来源:treeview.c

示例10: click_walk

static error click_walk(treeview_t    *tr,
                       int             depth,
                       int             x,
                       int             y,
                       ntree_t        *t,
                       connector_flags flags,
                       int             index,
                       txtfmt_t       *tx,
                       int             height,
                       void           *opaque)
{
  treeview_click_data *data = opaque;
  os_box               box;

  NOT_USED(tr);
  NOT_USED(t);
  NOT_USED(flags);
  NOT_USED(index);
  NOT_USED(tx);
  NOT_USED(height);

  /* hit detect */

  box.x0 = x + depth * tr->line_height;
  box.y0 = y;
  box.x1 = box.x0 + tr->line_height;
  box.y1 = box.y0 + tr->line_height;

  if (box_contains_point(&box, data->x, data->y))
    /* exiting here means that tr->walk.x and y are valid */
    return error_TREEVIEW_FOUND;
  else
    return error_OK;
}
开发者ID:dpt,项目名称:PrivateEye,代码行数:34,代码来源:treeview.c

示例11: USBD_CDC_HID_Init

/**
  * @brief  USBD_CDC_HID_Init
  *         Initialize the CDC interface
  * @param  pdev: device instance
  * @param  cfgidx: Configuration index
  * @retval status
  */
static uint8_t  USBD_CDC_HID_Init (USBD_HandleTypeDef *pdev,
                               uint8_t cfgidx)
{

  pdev->pClassData = &cdc_hid;
  USBD_CDC_HID_HandleTypeDef   *handle = (USBD_CDC_HID_HandleTypeDef*) pdev->pClassData;

  NOT_USED(cfgidx);
  uint8_t ret = 0;
  
  /* Open EP IN */
  USBD_LL_OpenEP(pdev,
                 CDC_IN_EP,
                 USBD_EP_TYPE_BULK,
                 CDC_DATA_FS_IN_PACKET_SIZE);

  /* Open EP OUT */
  USBD_LL_OpenEP(pdev,
                 CDC_OUT_EP,
                 USBD_EP_TYPE_BULK,
                 CDC_DATA_FS_OUT_PACKET_SIZE);
  /* Open Command IN EP */
  USBD_LL_OpenEP(pdev,
                 CDC_CMD_EP,
                 USBD_EP_TYPE_INTR,
                 CDC_CMD_PACKET_SIZE);
  
  /* Init Xfer states */
  handle->cdcState = CDC_IDLE;

  /* Prepare Out endpoint to receive next packet */
  USBD_LL_PrepareReceive(pdev,
                         CDC_OUT_EP,
                         handle->cdcRX,
                         CDC_DATA_FS_OUT_PACKET_SIZE);

#ifdef USE_USB_HID
  unsigned int reportSize = 0;
  handle->hidReportDesc = USB_GetHIDReportDesc(&reportSize);
  handle->hidReportDescSize = (uint16_t)reportSize;

  /* Open HID EP IN - even if we're not using it */
  USBD_LL_OpenEP(pdev,
                 HID_IN_EP,
                 USBD_EP_TYPE_INTR,
                 HID_DATA_IN_PACKET_SIZE);

  handle->hidState = HID_IDLE;
#endif

  return ret;
}
开发者ID:8bitgeek,项目名称:Espruino,代码行数:59,代码来源:usbd_cdc_hid.c

示例12: afterwards

/*JSON{
  "type" : "method",
  "class" : "SPI",
  "name" : "send4bit",
  "generate" : "jswrap_spi_send4bit",
  "params" : [
    ["data","JsVar","The data to send - either an integer, array, or string"],
    ["bit0","int32","The 4 bits to send for a 0 (MSB first)"],
    ["bit1","int32","The 4 bits to send for a 1 (MSB first)"],
    ["nss_pin","pin","An nSS pin - this will be lowered before SPI output and raised afterwards (optional). There will be a small delay between when this is lowered and when sending starts, and also between sending finishing and it being raised."]
  ]
}
Send data down SPI, using 4 bits for each 'real' bit (MSB first). This can be useful for faking one-wire style protocols

Sending multiple bytes in one call to send is preferable as they can then be transmitted end to end. Using multiple calls to send() will result in significantly slower transmission speeds.
 */
void jswrap_spi_send4bit(JsVar *parent, JsVar *srcdata, int bit0, int bit1, Pin nss_pin) {
  NOT_USED(parent);
  IOEventFlags device = jsiGetDeviceFromClass(parent);
  if (!DEVICE_IS_SPI(device)) {
    jsExceptionHere(JSET_ERROR, "SPI.send4bit only works on hardware SPI");
    return;
  }

  jshSPISet16(device, true); // 16 bit output

  if (bit0==0 && bit1==0) {
    bit0 = 0x01;
    bit1 = 0x03;
  }
  bit0 = bit0 & 0x0F;
  bit1 = bit1 & 0x0F;

  if (!jshIsDeviceInitialised(device)) {
    JshSPIInfo inf;
    jshSPIInitInfo(&inf);
    jshSPISetup(device, &inf);
  }

  // we're just sending (no receive)
  jshSPISetReceive(device, false);
  // assert NSS
  if (nss_pin!=PIN_UNDEFINED) jshPinOutput(nss_pin, false);

  // send data
  if (jsvIsNumeric(srcdata)) {
    jsspiSend4bit(device, (unsigned char)jsvGetInteger(srcdata), bit0, bit1);
  } else if (jsvIsIterable(srcdata)) {
    jshInterruptOff();
    JsvIterator it;
    jsvIteratorNew(&it, srcdata);
    while (jsvIteratorHasElement(&it)) {
      unsigned char in = (unsigned char)jsvIteratorGetIntegerValue(&it);
      jsspiSend4bit(device, in, bit0, bit1);
      jsvIteratorNext(&it);
    }
    jsvIteratorFree(&it);
    jshInterruptOn();
  } else {
    jsExceptionHere(JSET_ERROR, "Variable type %t not suited to transmit operation", srcdata);
  }

  jshSPIWait(device); // wait until SPI send finished and clear the RX buffer

  // de-assert NSS
  if (nss_pin!=PIN_UNDEFINED) jshPinOutput(nss_pin, true);
  jshSPISet16(device, false); // back to 8 bit
}
开发者ID:RobinLin,项目名称:Espruino,代码行数:68,代码来源:jswrap_spi_i2c.c

示例13: _jswrap_serial_print

void _jswrap_serial_print(JsVar *parent, JsVar *arg, bool isPrint, bool newLine) {
  NOT_USED(parent);
  IOEventFlags device = jsiGetDeviceFromClass(parent);
  if (!DEVICE_IS_USART(device)) return;

  if (isPrint) arg = jsvAsString(arg, false);
  jsvIterateCallback(arg, _jswrap_serial_print_cb, (void*)&device);
  if (isPrint) jsvUnLock(arg);
  if (newLine) {
    _jswrap_serial_print_cb((unsigned char)'\r', (void*)&device);
    _jswrap_serial_print_cb((unsigned char)'\n', (void*)&device);
  }
}
开发者ID:RepRapThailand,项目名称:Espruino,代码行数:13,代码来源:jswrap_serial.c

示例14: do_dispatch_repaint_event_to_all

static struct widget* do_dispatch_repaint_event_to_all(struct widget* w, union message* msg)
{
    NOT_USED(msg);
    if(w->callback != NULL)
    {
        union message msg;
        msg.widget_repaint.type = MESSAGE_TYPE_WIDGET_REPAINT;
        msg.widget_repaint.area = w->area;

        w->callback(w, &msg);
    }
    return NULL;
}
开发者ID:FangKuangKuang,项目名称:egui,代码行数:13,代码来源:exec.c

示例15: b_let

int    b_let(int argc,char *argv[],void *extra)
{
	register int r;
	register char *arg;
	NOT_USED(argc);
	NOT_USED(extra);
	while (r = optget(argv,sh_optlet)) switch (r)
	{
	    case ':':
		errormsg(SH_DICT,2, "%s", opt_info.arg);
		break;
	    case '?':
		errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg);
		break;
	}
	argv += opt_info.index;
	if(error_info.errors || !*argv)
		errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
	while(arg= *argv++)
		r = !sh_arith(arg);
	return(r);
}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:22,代码来源:misc.c


注:本文中的NOT_USED函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。