sola.lu
5 天以前 af6ee422a8dc5280a3aa7916c1742ecfdc9a57d7
libscpi/src/error.c
@@ -36,11 +36,11 @@
#include <stdint.h>
#include "scpi/parser.h"
#include "scpi/ieee488.h"
#include "scpi/error.h"
#include <scpi/parser.h>
#include <scpi/ieee488.h>
#include <scpi/error.h>
#include "fifo_private.h"
#include "scpi/constants.h"
#include <scpi/constants.h>
#if USE_DEVICE_DEPENDENT_ERROR_INFORMATION
#define SCPI_ERROR_SETVAL(e, c, i) do { (e)->error_code = (c); (e)->device_dependent_info = (i); } while(0)
@@ -133,7 +133,10 @@
    /* SCPIDEFINE_strndup is sometimes a dumy that does not reference it's arguments. 
       Since info_len is not referenced elsewhere caoing to void prevents unusd argument warnings */
    (void) info_len;
    char * info_ptr = info ? SCPIDEFINE_strndup(&context->error_info_heap, info, info_len) : NULL;
    char * info_ptr = NULL;
    if (info) {
        info_ptr = SCPIDEFINE_strndup(&context->error_info_heap, info, info_len);
    }
    SCPI_ERROR_SETVAL(&error_value, err, info_ptr);
    if (!fifo_add(&context->error_queue, &error_value)) {
        SCPIDEFINE_free(&context->error_info_heap, error_value.device_dependent_info, true);