diff --git a/DSView/main.cpp b/DSView/main.cpp index c5157238..13b8f20d 100644 --- a/DSView/main.cpp +++ b/DSView/main.cpp @@ -218,7 +218,7 @@ bool bHighScale = true; //init core if (!control->Init()){ - dsv_err("%s", "init error!"); + dsv_err("init error!"); return 1; } @@ -240,7 +240,7 @@ bool bHighScale = true; } catch (const std::exception &e) { - dsv_err("%s", "main() catch a except!"); + dsv_err("main() catch a except!"); const char *exstr = e.what(); dsv_err("%s", exstr); } diff --git a/DSView/pv/appcontrol.cpp b/DSView/pv/appcontrol.cpp index 7800eeee..eb40ad33 100644 --- a/DSView/pv/appcontrol.cpp +++ b/DSView/pv/appcontrol.cpp @@ -113,7 +113,7 @@ bool AppControl::Init() // Initialise libsigrokdecode if (srd_init(path) != SRD_OK) { - dsv_err("%s", "ERROR: libsigrokdecode init failed."); + dsv_err("ERROR: libsigrokdecode init failed."); return false; } diff --git a/DSView/pv/config/appconfig.cpp b/DSView/pv/config/appconfig.cpp index 795a4b91..de5bd99b 100644 --- a/DSView/pv/config/appconfig.cpp +++ b/DSView/pv/config/appconfig.cpp @@ -407,7 +407,7 @@ QString GetAppDataDir() return dir1.absolutePath(); } - dsv_err("%s", "Data directory is not exists: ../share/DSView"); + dsv_err("Data directory is not exists: ../share/DSView"); assert(false); #else diff --git a/DSView/pv/data/decode/annotationrestable.cpp b/DSView/pv/data/decode/annotationrestable.cpp index c20e07b1..e4698ec9 100644 --- a/DSView/pv/data/decode/annotationrestable.cpp +++ b/DSView/pv/data/decode/annotationrestable.cpp @@ -170,7 +170,7 @@ const char* AnnotationResTable::format_to_string(const char *hex_str, int fmt) dex = (int)(c - 'a') + 10; } else{ - dsv_err("%s", "is not a hex string"); + dsv_err("is not a hex string"); assert(false); } diff --git a/DSView/pv/data/decoderstack.cpp b/DSView/pv/data/decoderstack.cpp index 4026bb32..8f03933b 100644 --- a/DSView/pv/data/decoderstack.cpp +++ b/DSView/pv/data/decoderstack.cpp @@ -519,7 +519,7 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod //struct srd_push_param push_param; if( i >= decode_end){ - dsv_info("%s", "decode data index have been to end"); + dsv_info("decode data index have been to end"); } std::vector chunk; @@ -774,7 +774,7 @@ void DecoderStack::annotation_callback(srd_proto_data *pdata, void *self) return; } if (d->_decoder_status == NULL){ - dsv_err("%s", "decode task was deleted."); + dsv_err("decode task was deleted."); assert(false); } diff --git a/DSView/pv/dialogs/fftoptions.cpp b/DSView/pv/dialogs/fftoptions.cpp index 16267078..54500e7c 100644 --- a/DSView/pv/dialogs/fftoptions.cpp +++ b/DSView/pv/dialogs/fftoptions.cpp @@ -82,7 +82,7 @@ FftOptions::FftOptions(QWidget *parent, SigSession *session) : _sample_limit = _sample_limit * 0.5; } else { - dsv_err("%s", "ERROR: config_get SR_CONF_MAX_DSO_SAMPLELIMITS failed."); + dsv_err("ERROR: config_get SR_CONF_MAX_DSO_SAMPLELIMITS failed."); } std::vector windows; diff --git a/DSView/pv/dock/protocoldock.cpp b/DSView/pv/dock/protocoldock.cpp index eb2945a5..b8e6810f 100644 --- a/DSView/pv/dock/protocoldock.cpp +++ b/DSView/pv/dock/protocoldock.cpp @@ -368,13 +368,13 @@ void ProtocolDock::on_add_protocol() bool ProtocolDock::add_protocol_by_id(QString id, bool silent, std::list &sub_decoders) { if (_session->get_device()->get_work_mode() != LOGIC) { - dsv_info("%s", "Protocol Analyzer\nProtocol Analyzer is only valid in Digital Mode!"); + dsv_info("Protocol Analyzer\nProtocol Analyzer is only valid in Digital Mode!"); return false; } int dex = this->get_protocol_index_by_id(id); if (dex == -1){ - dsv_err("%s%s", "Protocol not exists! id:", id.toUtf8().data()); + dsv_err("Protocol not exists! id:%s", id.toUtf8().data()); return false; } @@ -735,7 +735,7 @@ void ProtocolDock::search_nxt() auto decoder_stack = decoder_model->getDecoderStack(); if (decoder_stack == NULL){ - dsv_err("%s", "decoder_stack is null"); + dsv_err("decoder_stack is null"); return; } diff --git a/DSView/pv/log.cpp b/DSView/pv/log.cpp index 11496032..c92f1fda 100644 --- a/DSView/pv/log.cpp +++ b/DSView/pv/log.cpp @@ -71,7 +71,7 @@ void dsv_log_enalbe_logfile(bool append) int ret = xlog_add_receiver_from_file(log_ctx, log_file.c_str(), &log_file_index, append); if (ret != 0){ - dsv_err("%s", "Create log file error!"); + dsv_err("Create log file error!"); } } } @@ -85,7 +85,7 @@ void dsv_clear_log_file() int ret = xlog_reset_log_file(log_ctx, log_file_index, log_file.c_str()); if (ret != 0){ - dsv_err("%s", "Clear log file error!"); + dsv_err("Clear log file error!"); } } else{ diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index 8f20469b..429341bc 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -427,7 +427,7 @@ namespace pv { if (_device_agent->have_instance() == false) { - dsv_info("%s", "There is no need to save the configuration"); + dsv_info("There is no need to save the configuration"); return; } @@ -593,7 +593,7 @@ namespace pv if (_device_agent->have_instance() == false) { - dsv_info("%s", "Have no device, can't to save data."); + dsv_info("Have no device, can't to save data."); return; } @@ -629,7 +629,7 @@ namespace pv bool MainWindow::load_config_from_file(QString file) { if (file == ""){ - dsv_err("%s", "File name is empty."); + dsv_err("File name is empty."); assert(false); } @@ -647,7 +647,7 @@ namespace pv if (!sf.open(QIODevice::ReadOnly)) { - dsv_warn("%s", "Warning: Couldn't open device profile to load!"); + dsv_warn("Warning: Couldn't open device profile to load!"); return false; } @@ -696,7 +696,7 @@ namespace pv gvar_opts = _device_agent->get_config_list(NULL, SR_CONF_DEVICE_SESSIONS); if (gvar_opts == NULL) { - dsv_warn("%s", "Device config list is empty. id:SR_CONF_DEVICE_SESSIONS"); + dsv_warn("Device config list is empty. id:SR_CONF_DEVICE_SESSIONS"); /* Driver supports no device instance sessions. */ return false; } @@ -810,7 +810,7 @@ namespace pv // check config file version if (!sessionObj.contains("Version")) { - dsv_dbg("%s", "Profile version is not exists!"); + dsv_dbg("Profile version is not exists!"); return false; } @@ -818,7 +818,7 @@ namespace pv if (format_ver < 2) { - dsv_err("%s", "Profile version is error!"); + dsv_err("Profile version is error!"); return false; } @@ -1145,7 +1145,7 @@ namespace pv bool MainWindow::save_config_to_file(QString name) { if (name == ""){ - dsv_err("%s", "Session file name is empty."); + dsv_err("Session file name is empty."); assert(false); } @@ -1155,7 +1155,7 @@ namespace pv QFile sf(name); if (!sf.open(QIODevice::WriteOnly | QIODevice::Text)) { - dsv_warn("%s", "Warning: Couldn't open profile to write!"); + dsv_warn("Warning: Couldn't open profile to write!"); return false; } @@ -1695,7 +1695,7 @@ namespace pv bSucesss = false; if (file == ""){ - dsv_err("%s", "File name is empty."); + dsv_err("File name is empty."); assert(false); } @@ -1733,7 +1733,7 @@ namespace pv bSucesss = false; if (file == ""){ - dsv_err("%s", "File name is empty."); + dsv_err("File name is empty."); assert(false); } @@ -2017,7 +2017,7 @@ namespace pv ds_device_handle devh = _sampling_bar->get_next_device_handle(); if (devh != NULL_HANDLE) { - dsv_info("%s", "Auto switch to the selected device."); + dsv_info("Auto switch to the selected device."); _session->set_device(devh); } } diff --git a/DSView/pv/sigsession.cpp b/DSView/pv/sigsession.cpp index 59ee1e1a..895b4865 100644 --- a/DSView/pv/sigsession.cpp +++ b/DSView/pv/sigsession.cpp @@ -157,7 +157,7 @@ namespace pv if (ds_lib_init() != SR_OK) { - dsv_err("%s", "DSView run ERROR: collect lib init failed."); + dsv_err("DSView run ERROR: collect lib init failed."); return false; } @@ -184,16 +184,16 @@ namespace pv struct ds_device_base_info *array = NULL; int count = 0; - dsv_info("%s", "Set default device."); + dsv_info("Set default device."); if (ds_get_device_list(&array, &count) != SR_OK) { - dsv_err("%s", "Get device list error!"); + dsv_err("Get device list error!"); return false; } if (count < 1 || array == NULL) { - dsv_err("%s", "Error! Device list is empty, can't set default device."); + dsv_err("Error! Device list is empty, can't set default device."); return false; } @@ -224,7 +224,7 @@ namespace pv if (ds_active_device(dev_handle) != SR_OK) { - dsv_err("%s", "Switch device error!"); + dsv_err("Switch device error!"); return false; } @@ -302,7 +302,7 @@ namespace pv if (ds_device_from_file(file_str.c_str()) != SR_OK) { - dsv_err("%s", "Load file error!"); + dsv_err("Load file error!"); return false; } @@ -315,14 +315,14 @@ namespace pv if (dev_handle == _device_agent.handle() && _is_working) { - dsv_err("%s", "The virtual device is running, can't remove it."); + dsv_err("The virtual device is running, can't remove it."); return; } bool isCurrent = dev_handle == _device_agent.handle(); if (ds_remove_device(dev_handle) != SR_OK) { - dsv_err("%s", "Remove virtual deivice error!"); + dsv_err("Remove virtual deivice error!"); } if (isCurrent) @@ -501,23 +501,23 @@ namespace pv { assert(_callback); - dsv_info("%s", "Start collect."); + dsv_info("Start collect."); if (_is_working) { - dsv_err("%s", "Error! Is working now."); + dsv_err("Error! Is working now."); return false; } // Check that a device instance has been selected. if (_device_agent.have_instance() == false) { - dsv_err("%s", "Error!No device selected"); + dsv_err("Error!No device selected"); assert(false); } if (_device_status == ST_RUNNING || _device_agent.is_collecting()) { - dsv_err("%s", "Error!Device is running."); + dsv_err("Error!Device is running."); return false; } @@ -598,7 +598,7 @@ namespace pv { if (_device_agent.is_collecting()) { - dsv_err("%s", "Error!Device is running."); + dsv_err("Error!Device is running."); return false; } @@ -677,7 +677,7 @@ namespace pv capture_init(); if (_device_agent.start() == false){ - dsv_err("%s", "Start collect error!"); + dsv_err("Start collect error!"); return false; } @@ -1131,7 +1131,7 @@ namespace pv { if (_capture_data->get_logic()->memory_failed()) { - dsv_err("%s", "Unexpected logic packet"); + dsv_err("Unexpected logic packet"); return; } @@ -1174,7 +1174,7 @@ namespace pv { if (_capture_data->get_dso()->memory_failed()) { - dsv_err("%s", "Unexpected dso packet"); + dsv_err("Unexpected dso packet"); return; // This dso packet was not expected. } @@ -1255,7 +1255,7 @@ namespace pv { if (_capture_data->get_analog()->memory_failed()) { - dsv_err("%s", "Unexpected analog packet"); + dsv_err("Unexpected analog packet"); return; // This analog packet was not expected. } @@ -1436,7 +1436,7 @@ namespace pv { if (dec == NULL) { - dsv_err("%s", "Decoder instance is null!"); + dsv_err("Decoder instance is null!"); assert(false); } @@ -1529,7 +1529,7 @@ namespace pv } catch (...) { - dsv_err("%s", "Error!add_decoder() throws an exception."); + dsv_err("Error!add_decoder() throws an exception."); } return false; @@ -1786,7 +1786,7 @@ namespace pv { (*it)->decoder()->stop_decode_work(); _decode_tasks.erase(it); - dsv_info("%s", "remove a waiting decode task"); + dsv_info("remove a waiting decode task"); return; } } @@ -1881,7 +1881,7 @@ namespace pv // the decode task thread proc void SigSession::decode_task_proc() { - dsv_info("%s", "------->decode thread start"); + dsv_info("------->decode thread start"); auto task = get_top_decode_task(); while (task != NULL) @@ -1893,7 +1893,7 @@ namespace pv if (task->_delete_flag) { - dsv_info("%s", "destroy a decoder in task thread"); + dsv_info("destroy a decoder in task thread"); DESTROY_QT_LATER(task); std::this_thread::sleep_for(std::chrono::milliseconds(100)); @@ -1908,7 +1908,7 @@ namespace pv _view_data->get_logic()->decode_end(); - dsv_info("%s", "------->decode thread end"); + dsv_info("------->decode thread end"); _is_decoding = false; } @@ -1927,7 +1927,7 @@ namespace pv { if (_session == NULL) { - dsv_err("%s", "Error!Global variable \"_session\" is null."); + dsv_err("Error!Global variable \"_session\" is null."); return; } _session->on_device_lib_event(event); @@ -1937,7 +1937,7 @@ namespace pv { if (_callback == NULL) { - dsv_detail("%s", "The callback is null, so the device event was ignored."); + dsv_detail("The callback is null, so the device event was ignored."); return; } @@ -1955,7 +1955,7 @@ namespace pv || !_capture_data->get_dso()->last_ended() || !_capture_data->get_analog()->last_ended()) { - dsv_err("%s", "Error!The data is not completed."); + dsv_err("Error!The data is not completed."); assert(false); } break; @@ -1971,13 +1971,13 @@ namespace pv _callback->trigger_message(DSV_MSG_COLLECT_END); if (_capture_data->get_logic()->last_ended() == false) - dsv_err("%s", "The collected data is error!"); + dsv_err("The collected data is error!"); if (_capture_data->get_dso()->last_ended() == false) - dsv_err("%s", "The collected data is error!"); + dsv_err("The collected data is error!"); if (_capture_data->get_analog()->last_ended() == false) - dsv_err("%s", "The collected data is error!"); + dsv_err("The collected data is error!"); // trig next collect if (is_repeat_mode() && _is_working && event == DS_EV_COLLECT_TASK_END) @@ -2017,7 +2017,7 @@ namespace pv break; default: - dsv_err("%s", "Error!Unknown device event."); + dsv_err("Error!Unknown device event."); break; } } diff --git a/DSView/pv/storesession.cpp b/DSView/pv/storesession.cpp index eb94a865..1cace161 100644 --- a/DSView/pv/storesession.cpp +++ b/DSView/pv/storesession.cpp @@ -934,7 +934,7 @@ void StoreSession::export_proc(data::Snapshot *snapshot) uint8_t *ch_data_buffer = (uint8_t*)malloc(usize * dso_snapshot->get_channel_num() + 1); if (ch_data_buffer == NULL){ - dsv_err("%s", "StoreSession::export_proc, malloc failed."); + dsv_err("StoreSession::export_proc, malloc failed."); return; } @@ -1121,12 +1121,12 @@ bool StoreSession::load_decoders(dock::ProtocolDock *widget, QJsonArray &dec_arr { if (_session->get_device()->get_work_mode() != LOGIC) { - dsv_info("%s", "StoreSession::load_decoders(), is not LOGIC mode."); + dsv_info("StoreSession::load_decoders(), is not LOGIC mode."); return false; } if (dec_array.isEmpty()){ - dsv_info("%s", "StoreSession::load_decoders(), json object array is empty."); + dsv_info("StoreSession::load_decoders(), json object array is empty."); return false; } diff --git a/DSView/pv/toolbars/samplingbar.cpp b/DSView/pv/toolbars/samplingbar.cpp index f92cd136..7be29bcb 100644 --- a/DSView/pv/toolbars/samplingbar.cpp +++ b/DSView/pv/toolbars/samplingbar.cpp @@ -258,7 +258,7 @@ namespace pv if (_device_agent->have_instance() == false) { - dsv_info("%s", "Have no device, can't to set device config."); + dsv_info("Have no device, can't to set device config."); return; } @@ -383,11 +383,11 @@ namespace pv const uint64_t *elements = NULL; gsize num_elements; - dsv_info("%s", "Update rate list."); + dsv_info("Update rate list."); if (_updating_sample_rate) { - dsv_err("%s", "Error! The rate list is updating."); + dsv_err("Error! The rate list is updating."); return; } @@ -396,7 +396,7 @@ namespace pv if (_device_agent->have_instance() == false) { - dsv_info("%s", "SamplingBar::update_sample_rate_selector, have no device."); + dsv_info("SamplingBar::update_sample_rate_selector, have no device."); return; } @@ -487,11 +487,11 @@ namespace pv double duration; bool rle_support = false; - dsv_info("%s", "Update sample count list."); + dsv_info("Update sample count list."); if (_updating_sample_count) { - dsv_err("%s", "Error! The sample count is updating."); + dsv_err("Error! The sample count is updating."); return; } @@ -644,7 +644,7 @@ namespace pv } else { - dsv_err("%s", "ERROR: config_get SR_CONF_TIMEBASE failed."); + dsv_err("ERROR: config_get SR_CONF_TIMEBASE failed."); return; } } @@ -656,7 +656,7 @@ namespace pv } else { - dsv_err("%s", "ERROR: config_get SR_CONF_TIMEBASE failed."); + dsv_err("ERROR: config_get SR_CONF_TIMEBASE failed."); return; } const uint64_t samplerate = _device_agent->get_sample_rate(); @@ -735,7 +735,7 @@ namespace pv if (_device_agent->get_config_uint64(SR_CONF_MAX_DSO_SAMPLERATE, max_sample_rate) == false) { - dsv_err("%s", "ERROR: config_get SR_CONF_MAX_DSO_SAMPLERATE failed."); + dsv_err("ERROR: config_get SR_CONF_MAX_DSO_SAMPLERATE failed."); return -1; } @@ -825,7 +825,7 @@ namespace pv if (_device_agent->have_instance() == false) { - dsv_info("%s", "Have no device, can't to collect data."); + dsv_info("Have no device, can't to collect data."); return false; } @@ -894,7 +894,7 @@ namespace pv if (_device_agent->have_instance() == false) { - dsv_info("%s", "Error! Have no device, can't to collect data."); + dsv_info("Error! Have no device, can't to collect data."); return false; } @@ -941,7 +941,7 @@ namespace pv } if (_device_selector.currentIndex() == -1) { - dsv_err("%s", "Have no selected device."); + dsv_err("Have no selected device."); return; } _session->stop_capture(); @@ -1098,13 +1098,13 @@ namespace pv int dev_count = 0; int select_index = 0; - dsv_info("%s", "Update device list."); + dsv_info("Update device list."); array = _session->get_device_list(dev_count, select_index); if (array == NULL) { - dsv_err("%s", "Get deivce list error!"); + dsv_err("Get deivce list error!"); return; } diff --git a/DSView/pv/ui/langresource.cpp b/DSView/pv/ui/langresource.cpp index 2e0229c9..957e3ac1 100644 --- a/DSView/pv/ui/langresource.cpp +++ b/DSView/pv/ui/langresource.cpp @@ -205,7 +205,7 @@ const char* LangResource::get_lang_text(int page_id, const char *str_id, const c std::lock_guard lock(_mutex); if (*str_id == '\0' || *default_str == '\0'){ - dsv_err("%s", "LangResource::get_lang_text(), param is empty."); + dsv_err("LangResource::get_lang_text(), param is empty."); assert(false); } diff --git a/DSView/pv/view/analogsignal.cpp b/DSView/pv/view/analogsignal.cpp index 862fe335..39f7faa6 100644 --- a/DSView/pv/view/analogsignal.cpp +++ b/DSView/pv/view/analogsignal.cpp @@ -79,7 +79,7 @@ AnalogSignal::AnalogSignal(data::AnalogSnapshot *data, sr_channel *probe) : // -- vpos ret = session->get_device()->get_config_uint16( SR_CONF_PROBE_OFFSET, _zero_offset, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_OFFSET failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_OFFSET failed."); } } @@ -273,7 +273,7 @@ uint64_t AnalogSignal::get_factor() return factor; } else { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_FACTOR failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed."); return 1; } } diff --git a/DSView/pv/view/devmode.cpp b/DSView/pv/view/devmode.cpp index 4afd8641..5bb9bb2d 100644 --- a/DSView/pv/view/devmode.cpp +++ b/DSView/pv/view/devmode.cpp @@ -108,7 +108,7 @@ void DevMode::changeEvent(QEvent *event) void DevMode::set_device() { if (_device_agent->have_instance() == false){ - dsv_detail("%s", "DevMode::set_device, Have no device."); + dsv_detail("DevMode::set_device, Have no device."); return; } @@ -213,7 +213,7 @@ void DevMode::on_mode_change() int mode = (*i).second->mode; if (_device_agent->get_work_mode() == mode){ - dsv_info("%s", "Current mode is set."); + dsv_info("Current mode is set."); break; } diff --git a/DSView/pv/view/dsosignal.cpp b/DSView/pv/view/dsosignal.cpp index 46f6b8be..bb31c1cd 100644 --- a/DSView/pv/view/dsosignal.cpp +++ b/DSView/pv/view/dsosignal.cpp @@ -143,7 +143,7 @@ void DsoSignal::set_enable(bool enable) ret = session->get_device()->get_config_bool(SR_CONF_PROBE_EN, cur_enable, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_EN failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_EN failed."); _en_lock = false; return; } @@ -290,13 +290,13 @@ bool DsoSignal::load_settings() uint64_t vfactor; ret = session->get_device()->get_config_uint64(SR_CONF_PROBE_VDIV, vdiv, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_VDIV failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_VDIV failed."); return false; } ret = session->get_device()->get_config_uint64(SR_CONF_PROBE_FACTOR, vfactor, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_FACTOR failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed."); return false; } @@ -309,14 +309,14 @@ bool DsoSignal::load_settings() _acCoupling = uint8_t(v); } else { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_COUPLING failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_COUPLING failed."); return false; } // -- vpos ret = session->get_device()->get_config_uint16(SR_CONF_PROBE_OFFSET, _zero_offset, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_OFFSET failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_OFFSET failed."); return false; } @@ -326,7 +326,7 @@ bool DsoSignal::load_settings() _trig_delta = get_trig_vrate() - get_zero_ratio(); } else { - dsv_err("%s", "ERROR: config_get SR_CONF_TRIGGER_VALUE failed."); + dsv_err("ERROR: config_get SR_CONF_TRIGGER_VALUE failed."); if (session->get_device()->is_hardware()) return false; @@ -488,7 +488,7 @@ void DsoSignal::set_factor(uint64_t factor) ret = session->get_device()->get_config_uint64(SR_CONF_PROBE_FACTOR, prefactor, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_FACTOR failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed."); return; } @@ -511,7 +511,7 @@ uint64_t DsoSignal::get_factor() return factor; } else { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_FACTOR failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed."); return 1; } } @@ -1123,7 +1123,7 @@ void DsoSignal::paint_type_options(QPainter &p, int right, const QPoint pt, QCol ret = session->get_device()->get_config_uint64(SR_CONF_PROBE_FACTOR, factor, _probe, NULL); if (!ret) { - dsv_err("%s", "ERROR: config_get SR_CONF_PROBE_FACTOR failed."); + dsv_err("ERROR: config_get SR_CONF_PROBE_FACTOR failed."); return; } diff --git a/libsigrok4DSL/backend.c b/libsigrok4DSL/backend.c index 46fbaa07..8c4c9400 100644 --- a/libsigrok4DSL/backend.c +++ b/libsigrok4DSL/backend.c @@ -401,7 +401,7 @@ SR_PRIV int sr_listen_hotplug(struct sr_context *ctx, hotplug_event_callback cal sr_err("%s(): callback was NULL.", __func__); return SR_ERR; } - sr_info("%s", "Register hotplug callback."); + sr_info("Register hotplug callback."); ctx->hotplug_callback = callback; @@ -432,7 +432,7 @@ SR_PRIV int sr_close_hotplug(struct sr_context *ctx) sr_err("%s(): libsigrok context was NULL.", __func__); return SR_ERR; } - sr_info("%s", "Unregister hotplug callback."); + sr_info("Unregister hotplug callback."); // Call user custom function. if (ctx->close_hotplug_ext != NULL){ diff --git a/libsigrok4DSL/hardware/DSL/dscope.c b/libsigrok4DSL/hardware/DSL/dscope.c index eb272a67..45ec0fd7 100644 --- a/libsigrok4DSL/hardware/DSL/dscope.c +++ b/libsigrok4DSL/hardware/DSL/dscope.c @@ -205,9 +205,9 @@ static GSList *scan(GSList *options) is_speed_not_match = 0; if (options != NULL) - sr_info("%s", "Scan DSCope device with options."); + sr_info("Scan DSCope device with options."); else - sr_info("%s", "Scan DSCope device..."); + sr_info("Scan DSCope device..."); conn = NULL; for (l = options; l; l = l->next) { @@ -219,7 +219,7 @@ static GSList *scan(GSList *options) } } if (conn){ - sr_info("%s", "Find usb device with connect config."); + sr_info("Find usb device with connect config."); conn_devices = sr_usb_find(drvc->sr_ctx->libusb_ctx, conn); } else @@ -335,7 +335,7 @@ static GSList *scan(GSList *options) /* Fill in probelist according to this device's profile. */ if (dsl_setup_probes(sdi, channel_modes[devc->ch_mode].num) != SR_OK){ - sr_err("%s", "dsl_setup_probes() error"); + sr_err("dsl_setup_probes() error"); dev_destroy(sdi); return NULL; } diff --git a/libsigrok4DSL/hardware/DSL/dsl.c b/libsigrok4DSL/hardware/DSL/dsl.c index 7e0bd15a..f64e82be 100644 --- a/libsigrok4DSL/hardware/DSL/dsl.c +++ b/libsigrok4DSL/hardware/DSL/dsl.c @@ -310,7 +310,7 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi) usb = sdi->conn; if (usb->usb_dev == NULL){ - sr_err("%s", "hw_dev_open(), usb->usb_dev is null."); + sr_err("hw_dev_open(), usb->usb_dev is null."); return SR_ERR; } @@ -321,7 +321,7 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi) } if (sdi->status == SR_ST_INITIALIZING) { - sr_info("%s", "The device instance is still boosting."); + sr_info("The device instance is still boosting."); } dev_handel = usb->usb_dev; @@ -1047,7 +1047,7 @@ SR_PRIV int dsl_fpga_arm(const struct sr_dev_inst *sdi) if (trigger == NULL) { - sr_err("%s", "Trigger have'nt inited."); + sr_err("Trigger have'nt inited."); return SR_ERR_CALL_STATUS; } @@ -1965,7 +1965,7 @@ SR_PRIV int dsl_dev_close(struct sr_dev_inst *sdi) usb = sdi->conn; if (usb->devhdl == NULL){ - sr_detail("%s", "dsl_dev_close(),libusb_device_handle is null."); + sr_detail("dsl_dev_close(),libusb_device_handle is null."); return SR_ERR; } diff --git a/libsigrok4DSL/hardware/DSL/dslogic.c b/libsigrok4DSL/hardware/DSL/dslogic.c index fe4c4c48..7e0ee431 100644 --- a/libsigrok4DSL/hardware/DSL/dslogic.c +++ b/libsigrok4DSL/hardware/DSL/dslogic.c @@ -291,9 +291,9 @@ static GSList *scan(GSList *options) is_speed_not_match = 0; if (options != NULL) - sr_info("%s", "Scan DSLogic device with options."); + sr_info("Scan DSLogic device with options."); else - sr_info("%s", "Scan DSLogic device..."); + sr_info("Scan DSLogic device..."); conn = NULL; for (l = options; l; l = l->next) { @@ -306,7 +306,7 @@ static GSList *scan(GSList *options) } if (conn){ - sr_info("%s", "Find usb device with connect config."); + sr_info("Find usb device with connect config."); conn_devices = sr_usb_find(drvc->sr_ctx->libusb_ctx, conn); } else @@ -421,7 +421,7 @@ static GSList *scan(GSList *options) /* Fill in probelist according to this device's profile. */ if (dsl_setup_probes(sdi, channel_modes[devc->ch_mode].num) != SR_OK){ - sr_err("%s", "dsl_setup_probes() error"); + sr_err("dsl_setup_probes() error"); dev_destroy(sdi); return NULL; } diff --git a/libsigrok4DSL/hardware/demo/demo.c b/libsigrok4DSL/hardware/demo/demo.c index f76751b9..f9d88c08 100644 --- a/libsigrok4DSL/hardware/demo/demo.c +++ b/libsigrok4DSL/hardware/demo/demo.c @@ -671,7 +671,7 @@ static int hw_dev_open(struct sr_dev_inst *sdi) ret = load_virtual_device_session(sdi); if (ret != SR_OK) { - sr_err("%s", "Error!Load session file failed."); + sr_err("Error!Load session file failed."); return ret; } diff --git a/libsigrok4DSL/hwdriver.c b/libsigrok4DSL/hwdriver.c index 86f24e13..59cc5df5 100644 --- a/libsigrok4DSL/hwdriver.c +++ b/libsigrok4DSL/hwdriver.c @@ -416,7 +416,7 @@ SR_PRIV int ds_scan_all_device_list(libusb_context *usb_ctx,struct libusb_device if (des.idVendor == DS_VENDOR_ID){ if (wr >= size){ - sr_err("%s", "ds_scan_all_device_list(), buffer length is too short."); + sr_err("ds_scan_all_device_list(), buffer length is too short."); assert(0); } diff --git a/libsigrok4DSL/lib_main.c b/libsigrok4DSL/lib_main.c index 24de076e..2fc1864a 100644 --- a/libsigrok4DSL/lib_main.c +++ b/libsigrok4DSL/lib_main.c @@ -167,7 +167,7 @@ SR_API int ds_lib_init() #endif // Scan the all hardware device. - sr_info("%s", "Scan all connected hardware device."); + sr_info("Scan all connected hardware device."); process_attach_event(0); sr_listen_hotplug(lib_ctx.sr_ctx, hotplug_event_listen_callback); @@ -232,7 +232,7 @@ SR_API int ds_lib_exit() if (sr_exit(lib_ctx.sr_ctx) != SR_OK) { - sr_err("%s", "call sr_exit error"); + sr_err("call sr_exit error"); } lib_ctx.sr_ctx = NULL; @@ -359,11 +359,11 @@ SR_API int ds_active_device(ds_device_handle handle) ret = SR_OK; old_dev = NULL; - sr_info("%s", "Start activating device."); + sr_info("Start activating device."); if (ds_is_collecting()) { - sr_err("%s", "Error!The current device is collecting, can not switch to it."); + sr_err("Error!the current device is collecting,can not switch to it."); return SR_ERR_CALL_STATUS; } @@ -398,7 +398,7 @@ SR_API int ds_active_device(ds_device_handle handle) bFind = 1; if (dev->dev_type == DEV_TYPE_USB && DS_RES_PATH[0] == '\0'){ - sr_err("%s", "Please call ds_set_firmware_resource_dir() to set the firmware resource path."); + sr_err("Please call ds_set_firmware_resource_dir() to set the firmware resource path."); } if (dev->dev_type == DEV_TYPE_FILELOG) @@ -422,12 +422,12 @@ SR_API int ds_active_device(ds_device_handle handle) if (old_dev != NULL){ if (old_dev->dev_type == DEV_TYPE_USB){ - sr_err("%s", "Open device error! Will switch to \"%s\", handle:%p.", + sr_err("Open device error! Will switch to \"%s\", handle:%p.", old_dev->name, old_dev->handle); } else{ - sr_err("%s", "Open device error! Will switch to \"%s\".", + sr_err("Open device error! Will switch to \"%s\".", old_dev->name); } @@ -441,7 +441,7 @@ SR_API int ds_active_device(ds_device_handle handle) pthread_mutex_unlock(&lib_ctx.mutext); - sr_info("%s", "Activating device end."); + sr_info("Activating device end."); if (!bFind) { @@ -488,7 +488,7 @@ SR_API int ds_active_device_by_index(int index) if (handle == NULL) { - sr_err("%s", "ds_active_device_by_index(), index is error!"); + sr_err("ds_active_device_by_index(), index is error!"); return SR_ERR_CALL_STATUS; } @@ -546,7 +546,7 @@ SR_API int ds_device_from_file(const char *file_path) int ret; if (file_path == NULL || *file_path == '\0'){ - sr_err("%s", "Error!File name is empty."); + sr_err("Error!File name is empty."); return SR_ERR_ARG; } @@ -577,11 +577,11 @@ SR_API const GSList *ds_get_actived_device_mode_list() if (dev == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); } if (dev->driver == NULL || dev->driver->dev_mode_list == NULL) { - sr_err("%s", "Module not implemented."); + sr_err("Module not implemented."); return NULL; } @@ -603,7 +603,7 @@ SR_API int ds_remove_device(ds_device_handle handle) if (lib_ctx.actived_device_instance != NULL && lib_ctx.actived_device_instance->handle == handle && ds_is_collecting()) { - sr_err("%s", "Device is collecting, can't remove it."); + sr_err("Device is collecting, can't remove it."); return SR_ERR_CALL_STATUS; } @@ -723,16 +723,16 @@ SR_API int ds_start_collect() lib_ctx.last_error = SR_OK; - sr_info("%s", "Start collect."); + sr_info("Start collect."); if (ds_is_collecting()) { - sr_err("%s", "Error,it's collecting!"); + sr_err("Error,it's collecting!"); return SR_ERR_CALL_STATUS; } if (di == NULL) { - sr_err("%s", "Please set a current device first."); + sr_err("Please set a current device first."); return SR_ERR_CALL_STATUS; } if (di->status == SR_ST_INITIALIZING) @@ -742,12 +742,12 @@ SR_API int ds_start_collect() } if (ds_channel_is_enabled() == 0) { - sr_err("%s", "There have no useable channel, unable to collect."); + sr_err("There have no useable channel, unable to collect."); return SR_ERR_CALL_STATUS; } if (lib_ctx.data_forward_callback == NULL) { - sr_err("%s", "Error! Data forwarding callback is not set, see \"ds_set_datafeed_callback()\"."); + sr_err("Error! Data forwarding callback is not set, see \"ds_set_datafeed_callback()\"."); return SR_ERR_CALL_STATUS; } @@ -759,7 +759,7 @@ SR_API int ds_start_collect() ret = open_device_instance(di); // open device if (ret != SR_OK) { - sr_err("%s", "Open device error!"); + sr_err("Open device error!"); return ret; } } @@ -781,11 +781,11 @@ static void collect_run_proc() send_event(DS_EV_COLLECT_TASK_START); - sr_info("%s", "Collect thread start."); + sr_info("Collect thread start."); if (di == NULL || di->driver == NULL || di->driver->dev_acquisition_start == NULL) { - sr_err("%s", "The device cannot be used."); + sr_err("The device cannot be used."); bError = 1; goto END; } @@ -808,13 +808,13 @@ static void collect_run_proc() if (ret != SR_OK) { - sr_err("%s", "Run session error!"); + sr_err("Run session error!"); bError = 1; goto END; } END: - sr_info("%s", "Collect thread end."); + sr_info("Collect thread end."); lib_ctx.collect_thread = NULL; if (bError) @@ -832,11 +832,11 @@ END: */ SR_API int ds_stop_collect() { - sr_info("%s", "Stop collect."); + sr_info("Stop collect."); if (!ds_is_collecting()) { - sr_err("%s", "It's not collecting now."); + sr_err("It's not collecting now."); return SR_ERR_CALL_STATUS; } @@ -875,13 +875,13 @@ SR_API int ds_release_actived_device() if (lib_ctx.actived_device_instance->dev_type == DEV_TYPE_USB) { - sr_info("%s", "Release current actived device. name:\"%s\", handle:%p", + sr_info("Release current actived device. name:\"%s\", handle:%p", lib_ctx.actived_device_instance->name, lib_ctx.actived_device_instance->handle); } else { - sr_info("%s", "Release current actived device. name:\"%s\"", + sr_info("Release current actived device. name:\"%s\"", lib_ctx.actived_device_instance->name); } @@ -933,7 +933,7 @@ SR_API int ds_get_actived_device_config(const struct sr_channel *ch, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); return SR_ERR_CALL_STATUS; } @@ -951,7 +951,7 @@ SR_API int ds_set_actived_device_config(const struct sr_channel *ch, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); return SR_ERR_CALL_STATUS; } @@ -968,7 +968,7 @@ SR_API int ds_get_actived_device_config_list(const struct sr_channel_group *cg, { if (lib_ctx.actived_device_instance == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); return SR_ERR_CALL_STATUS; } @@ -983,7 +983,7 @@ SR_API const struct sr_config_info *ds_get_actived_device_config_info(int key) { if (lib_ctx.actived_device_instance == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); return SR_ERR_CALL_STATUS; } @@ -994,7 +994,7 @@ SR_API int ds_get_actived_device_status(struct sr_status *status, gboolean prg) { if (lib_ctx.actived_device_instance == NULL) { - sr_err("%s", "Have no actived device."); + sr_err("Have no actived device."); return SR_ERR_CALL_STATUS; } @@ -1109,7 +1109,7 @@ SR_PRIV int sr_usb_device_is_exists(libusb_device *usb_dev) if (usb_dev == NULL) { - sr_err("%s", "sr_usb_device_is_exists(), @usb_dev is null."); + sr_err("sr_usb_device_is_exists(), @usb_dev is null."); return 0; } @@ -1190,7 +1190,7 @@ static int update_device_handle(struct libusb_device *old_dev, struct libusb_dev // Release the old device and the resource. if (dev == lib_ctx.actived_device_instance) { - sr_info("%s", "To release the old device's resource."); + sr_info("To release the old device's resource."); close_device_instance(dev); } @@ -1236,7 +1236,7 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib } if (dev == NULL){ - sr_err("%s", "hotplug_event_listen_callback(), the device handle is null."); + sr_err("hotplug_event_listen_callback(), the device handle is null."); return; } @@ -1254,14 +1254,14 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib if (lib_ctx.detach_device_handle == NULL) { - sr_err("%s", "The detached device handle is null, but the status is waitting for reconnect."); + sr_err("The detached device handle is null, but the status is waitting for reconnect."); } else { if (update_device_handle(lib_ctx.detach_device_handle, dev) == SR_OK) { bDone = 1; - sr_info("%s", "----------One device loose contact, but it reconnect success."); + sr_info("----------One device loose contact, but it reconnect success."); } else { @@ -1291,7 +1291,7 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib && lib_ctx.actived_device_instance->handle == (ds_device_handle)dev && ds_is_collecting()) { - sr_info("%s", "The collecting device is detached, will stop the collect thread."); + sr_info("The collecting device is detached, will stop the collect thread."); lib_ctx.is_stop_by_detached = 1; ds_release_actived_device(); } @@ -1305,7 +1305,7 @@ static void hotplug_event_listen_callback(struct libusb_context *ctx, struct lib } else { - sr_err("%s", "Unknown usb device event"); + sr_err("Unknown usb device event"); } } @@ -1318,7 +1318,7 @@ static void process_attach_event(int isEvent) int num = 0; if (isEvent){ - sr_info("%s", "Process device attach event."); + sr_info("Process device attach event."); } drivers = sr_driver_list(); @@ -1363,14 +1363,14 @@ static void process_detach_event() libusb_device *ev_dev; int ev; - sr_info("%s", "Process device detach event."); + sr_info("Process device detach event."); ev = DS_EV_INACTIVE_DEVICE_DETACH; ev_dev = lib_ctx.detach_device_handle; if (ev_dev == NULL) { - sr_err("%s", "The detached device handle is null."); + sr_err("The detached device handle is null."); return; } lib_ctx.detach_device_handle = NULL; @@ -1408,7 +1408,7 @@ static void process_detach_event() static void usb_hotplug_process_proc() { - sr_info("%s", "Hotplug thread start!"); + sr_info("Hotplug thread start!"); int cur_trans_id = 0; @@ -1447,7 +1447,7 @@ static void usb_hotplug_process_proc() if (lib_ctx.transaction_command == DEV_TRANS_OPEN){ if (lib_ctx.actived_device_instance != NULL){ - sr_info("%s", "To reopen the current device."); + sr_info("To reopen the current device."); open_device_instance(lib_ctx.actived_device_instance); } } @@ -1465,7 +1465,7 @@ static void usb_hotplug_process_proc() _sleep(100); } - sr_info("%s", "Hotplug thread end!"); + sr_info("Hotplug thread end!"); } static void make_demo_device_to_list() @@ -1503,7 +1503,7 @@ static void destroy_device_instance(struct sr_dev_inst *dev) { if (dev == NULL || dev->driver == NULL) { - sr_err("%s", "destroy_device_instance() argument error."); + sr_err("destroy_device_instance() argument error."); return; } struct sr_dev_driver *driver_ins; @@ -1519,7 +1519,7 @@ static void close_device_instance(struct sr_dev_inst *dev) { if (dev == NULL || dev->driver == NULL) { - sr_err("%s", "close_device_instance() argument error."); + sr_err("close_device_instance() argument error."); return; } struct sr_dev_driver *driver_ins; @@ -1533,7 +1533,7 @@ static int open_device_instance(struct sr_dev_inst *dev) { if (dev == NULL || dev->driver == NULL) { - sr_err("%s", "open_device_instance() argument error."); + sr_err("open_device_instance() argument error."); return SR_ERR_ARG; } struct sr_dev_driver *driver_ins; diff --git a/libsigrok4DSL/session.c b/libsigrok4DSL/session.c index ceca9b49..a6a2c66b 100644 --- a/libsigrok4DSL/session.c +++ b/libsigrok4DSL/session.c @@ -71,7 +71,7 @@ struct source { SR_PRIV struct sr_session *sr_session_new(void) { if (session != NULL){ - sr_detail("%s", "Destroy the old session."); + sr_detail("Destroy the old session."); sr_session_destroy(); // Destory the old. } @@ -147,7 +147,7 @@ static int sr_session_iteration(gboolean block) int ret; if (session == NULL){ - sr_err("%s", "sr_session_iteration(), session is null."); + sr_err("sr_session_iteration(), session is null."); return SR_ERR_CALL_STATUS; } @@ -174,7 +174,7 @@ static int sr_session_iteration(gboolean block) */ g_mutex_lock(&session->stop_mutex); if (session->abort_session) { - sr_info("%s", "Collection task aborted."); + sr_info("Collection task aborted."); current_device_acquisition_stop(); /* But once is enough. */ session->abort_session = FALSE; @@ -198,7 +198,7 @@ SR_PRIV int sr_session_run(void) return SR_ERR_BUG; } if (session->running == TRUE){ - sr_err("%s", "Session is running."); + sr_err("Session is running."); return SR_ERR_CALL_STATUS; } @@ -272,7 +272,7 @@ static void datafeed_dump(const struct sr_datafeed_packet *packet) const struct sr_datafeed_analog *analog; if (packet == NULL){ - sr_err("%s", "datafeed_dump() Error! packet is null."); + sr_err("datafeed_dump() Error! packet is null."); return; } @@ -342,7 +342,7 @@ static int _sr_session_source_add(GPollFD *pollfd, int timeout, return SR_ERR_ARG; } if (session == NULL){ - sr_err("%s", "_sr_session_source_add(), session is null."); + sr_err("_sr_session_source_add(), session is null."); return SR_ERR_CALL_STATUS; } @@ -464,7 +464,7 @@ static int _sr_session_source_remove(gintptr poll_object) unsigned int old; if (session == NULL){ - sr_err("%s", "_sr_session_source_remove(), session is null."); + sr_err("_sr_session_source_remove(), session is null."); return SR_ERR_CALL_STATUS; } diff --git a/libsigrok4DSL/session_driver.c b/libsigrok4DSL/session_driver.c index ebec269b..fc6c5f57 100644 --- a/libsigrok4DSL/session_driver.c +++ b/libsigrok4DSL/session_driver.c @@ -637,7 +637,7 @@ static int receive_data_logic_dso_v2(int fd, int revents, const struct sr_dev_in if ((pack_buffer->block_data_len - pack_buffer->block_read_len) % 8 != 0) { - sr_err("%s", "The block data is not align with 8 byte."); + sr_err("The block data is not align with 8 byte."); break; } } @@ -773,7 +773,7 @@ static int dev_open(struct sr_dev_inst *sdi) ret = sr_load_virtual_device_session(sdi); if (ret != SR_OK) { - sr_err("%s", "Error!Load session file failed."); + sr_err("Error!Load session file failed."); return ret; } diff --git a/libsigrok4DSL/tests/test_main.cpp b/libsigrok4DSL/tests/test_main.cpp index 46ab650c..3ab8d96c 100644 --- a/libsigrok4DSL/tests/test_main.cpp +++ b/libsigrok4DSL/tests/test_main.cpp @@ -37,7 +37,7 @@ void ctrl() { c = getchar(); if (c == 'x'){ - sr_info("%s", "exit."); + sr_info("exit."); break; } qDebug()<<"b"; diff --git a/libsigrok4DSL/trigger.c b/libsigrok4DSL/trigger.c index 2e4f25cd..4a25e190 100644 --- a/libsigrok4DSL/trigger.c +++ b/libsigrok4DSL/trigger.c @@ -104,7 +104,7 @@ SR_API int ds_trigger_stage_set_value(uint16_t stage, uint16_t probes, char *tri assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_stage_set_value() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_value() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -123,7 +123,7 @@ SR_API int ds_trigger_stage_set_logic(uint16_t stage, uint16_t probes, unsigned assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_stage_set_logic() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_logic() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -137,7 +137,7 @@ SR_API int ds_trigger_stage_set_inv(uint16_t stage, uint16_t probes, unsigned ch assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_stage_set_inv() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_inv() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -152,7 +152,7 @@ SR_API int ds_trigger_stage_set_count(uint16_t stage, uint16_t probes, uint32_t assert(probes <= MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_stage_set_count() error, trigger have'nt be inited."); + sr_err("ds_trigger_stage_set_count() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -172,7 +172,7 @@ SR_API int ds_trigger_probe_set(uint16_t probe, unsigned char trigger0, unsigned assert(probe < MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_probe_set() error, trigger have'nt be inited."); + sr_err("ds_trigger_probe_set() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -192,7 +192,7 @@ SR_API int ds_trigger_set_stage(uint16_t stages) assert(stages <= TriggerStages); if (trigger == NULL){ - sr_err("%s", "ds_trigger_set_stage() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_stage() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -211,7 +211,7 @@ SR_API int ds_trigger_set_pos(uint16_t position) assert(position <= 100); if (trigger == NULL){ - sr_err("%s", "ds_trigger_set_pos() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_pos() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -228,7 +228,7 @@ SR_API int ds_trigger_set_pos(uint16_t position) SR_API uint16_t ds_trigger_get_pos() { if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_pos() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_pos() error, trigger have'nt be inited."); return 0; } @@ -243,7 +243,7 @@ SR_API uint16_t ds_trigger_get_pos() SR_API int ds_trigger_set_en(uint16_t enable) { if (trigger == NULL){ - sr_err("%s", "ds_trigger_set_en() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_en() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -273,7 +273,7 @@ SR_API uint16_t ds_trigger_get_en() SR_API int ds_trigger_set_mode(uint16_t mode) { if (trigger == NULL){ - sr_err("%s", "ds_trigger_set_en() error, trigger have'nt be inited."); + sr_err("ds_trigger_set_en() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -292,7 +292,7 @@ SR_PRIV uint16_t ds_trigger_get_mask0(uint16_t stage, uint16_t msc, uint16_t lsc assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_mask0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_mask0() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -324,7 +324,7 @@ SR_PRIV uint16_t ds_trigger_get_mask1(uint16_t stage, uint16_t msc, uint16_t lsc assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_mask1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_mask1() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -356,7 +356,7 @@ SR_PRIV uint16_t ds_trigger_get_value0(uint16_t stage, uint16_t msc, uint16_t ls assert(msc < MaxTriggerProbes); if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_value0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_value0() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -393,7 +393,7 @@ SR_PRIV uint16_t ds_trigger_get_value1(uint16_t stage, uint16_t msc, uint16_t ls int i; if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_value1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_value1() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -425,7 +425,7 @@ SR_PRIV uint16_t ds_trigger_get_edge0(uint16_t stage, uint16_t msc, uint16_t lsc int i; if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_edge0() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_edge0() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; } @@ -458,7 +458,7 @@ SR_PRIV uint16_t ds_trigger_get_edge1(uint16_t stage, uint16_t msc, uint16_t lsc int i; if (trigger == NULL){ - sr_err("%s", "ds_trigger_get_edge1() error, trigger have'nt be inited."); + sr_err("ds_trigger_get_edge1() error, trigger have'nt be inited."); return SR_ERR_CALL_STATUS; }