Skip to content

Commit 24db276

Browse files
committed
Eliminate a bunch of warnings.
1 parent 07507f2 commit 24db276

File tree

9 files changed

+46
-29
lines changed

9 files changed

+46
-29
lines changed

lib/bus/iec/iec.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static void onTimer(void *info)
6868
//portEXIT_CRITICAL_ISR(&parent->timerMux);
6969
}
7070

71+
#if 0
7172
static void ml_iec_intr_task(void* arg)
7273
{
7374
while ( true )
@@ -79,6 +80,7 @@ static void ml_iec_intr_task(void* arg)
7980
taskYIELD();
8081
}
8182
}
83+
#endif
8284

8385
void systemBus::init_gpio(gpio_num_t _pin)
8486
{
@@ -328,14 +330,14 @@ void IRAM_ATTR systemBus::service()
328330
auto d = deviceById(data.device);
329331
if (d != nullptr)
330332
{
331-
device_state_t device_state = d->queue_command(data);
333+
d->queue_command(data);
332334

333335
//fnLedManager.set(eLed::LED_BUS, true);
334336

335337
//Debug_printv("bus[%d] device[%d]", state, device_state);
336338
// for (auto devicep : _daisyChain)
337339
// {
338-
device_state = d->process();
340+
d->process();
339341
if ( data.primary == IEC_TALK )
340342
data.init();
341343
// }
@@ -909,7 +911,7 @@ void systemBus::reset_all_our_devices()
909911
void systemBus::setBitTiming(std::string set, int p1, int p2, int p3, int p4)
910912
{
911913
uint8_t i = 0; // Send
912-
if (mstr::equals(set, "r")) i = 1;
914+
if (mstr::equals(set, (char *) "r")) i = 1;
913915
if (p1) protocol->bit_pair_timing[i][0] = p1;
914916
if (p2) protocol->bit_pair_timing[i][1] = p2;
915917
if (p3) protocol->bit_pair_timing[i][2] = p3;

lib/bus/iec/protocol/_protocol.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ IECProtocol::IECProtocol() {
2424
esp_timer_create_args_t args = {
2525
.callback = onTimer,
2626
.arg = this,
27-
.dispatch_method = ESP_TIMER_ISR,
28-
.name = "onTimer"
27+
.dispatch_method = ESP_TIMER_TASK,
28+
.name = "onTimer",
29+
.skip_unhandled_events = 0,
2930
};
3031
esp_timer_create(&args, &timer_handle);
3132
};
@@ -193,4 +194,4 @@ bool IRAM_ATTR IECProtocol::wait(size_t wait_us, uint64_t start, bool watch_atn)
193194
return true;
194195
}
195196

196-
#endif /* BUILD_IEC */
197+
#endif /* BUILD_IEC */

lib/bus/iec/protocol/cpbstandardserial.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ CPBStandardSerial::CPBStandardSerial()
7474
.callback = onSendBits,
7575
.arg = this,
7676
.dispatch_method = ESP_TIMER_ISR,
77-
.name = "onSendBits"
77+
.name = "onSendBits",
78+
.skip_unhandled_events = 0,
7879
};
7980
esp_timer_create(&args, &timer_send_h);
8081
//Debug_printv("send_timer_create");
@@ -614,4 +615,4 @@ bool CPBStandardSerial::sendBits ( uint8_t data )
614615
return true;
615616
} // sendBits
616617

617-
#endif // BUILD_IEC
618+
#endif // BUILD_IEC

lib/bus/iec/protocol/jiffydos.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ JiffyDOS::JiffyDOS() {
5252
esp_timer_create_args_t args = {
5353
.callback = onTimer,
5454
.arg = this,
55-
.name = nullptr
55+
.dispatch_method = ESP_TIMER_TASK,
56+
.name = nullptr,
57+
.skip_unhandled_events = 0,
5658
};
5759
esp_timer_create(&args, &timer_handle);
5860
};
@@ -198,4 +200,4 @@ bool JiffyDOS::sendByte ( uint8_t data, bool signalEOI )
198200
return true;
199201
} // sendByte
200202

201-
#endif /* BUILD_IEC*/
203+
#endif /* BUILD_IEC*/

lib/device/iec/drive.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,9 @@ bool iecDrive::registerStream ( uint8_t channel )
636636
// Debug_printv("_file[%s]", _file.c_str());
637637

638638
// TODO: Determine mode and create the proper stream
639+
#if 0
639640
std::ios_base::openmode mode = std::ios_base::in;
641+
#endif
640642

641643
Debug_printv("_base[%s]", _base->url.c_str());
642644
_base.reset( MFSOwner::File( _base->url ) );
@@ -1085,7 +1087,9 @@ bool iecDrive::sendFile()
10851087

10861088
uint8_t b; // byte
10871089
// uint8_t nb; // next byte
1090+
#if 0
10881091
uint8_t bi = 0;
1092+
#endif
10891093
uint16_t load_address = 0;
10901094
uint16_t sys_address = 0;
10911095

@@ -1255,7 +1259,9 @@ bool iecDrive::saveFile()
12551259
bool success = true;
12561260
bool done = false;
12571261

1262+
#if 0
12581263
size_t bi = 0;
1264+
#endif
12591265
size_t load_address = 0;
12601266
size_t b_len = 1;
12611267
uint8_t b[b_len];
@@ -1363,4 +1369,4 @@ void iecDrive::sendFileNotFound()
13631369
state = DEVICE_ERROR;
13641370
} // sendFileNotFound
13651371

1366-
#endif /* BUILD_IEC */
1372+
#endif /* BUILD_IEC */

lib/hardware/fnSystem.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393

9494

9595
#ifdef ESP_PLATFORM
96+
#if 0
9697
static QueueHandle_t card_detect_evt_queue = NULL;
9798

9899
static void IRAM_ATTR card_detect_isr_handler(void *arg)
@@ -141,6 +142,7 @@ static void setup_card_detect(gpio_num_t pin)
141142
// Add the card detect handler
142143
gpio_isr_handler_add(pin, card_detect_isr_handler, (void *)pin);
143144
}
145+
#endif
144146
// ESP_PLATFORM
145147
#else
146148
// !ESP_PLATFORM

lib/http/fnHttpClient.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,10 @@ int fnHttpClient::_perform()
473473
// Debug_printf("%08lx _perform notified\r\n", fnSystem.millis());
474474
// Debug_printf("Notification of headers loaded\r\n");
475475

476+
#if 0
476477
bool chunked = esp_http_client_is_chunked_response(_handle);
477478
int length = esp_http_client_get_content_length(_handle);
479+
#endif
478480
int status;
479481
switch (_client_err)
480482
{
@@ -564,9 +566,11 @@ int fnHttpClient::_perform_stream(esp_http_client_method_t method, uint8_t *writ
564566
}
565567

566568
// Collect results
569+
#if 0
567570
bool chunked = esp_http_client_is_chunked_response(_handle);
568-
int status = esp_http_client_get_status_code(_handle);
569571
int length = esp_http_client_get_content_length(_handle);
572+
#endif
573+
int status = esp_http_client_get_status_code(_handle);
570574
#ifdef VERBOSE_HTTP
571575
Debug_printf("status = %d, length = %d, chunked = %d\r\n", status, length, chunked ? 1 : 0);
572576
#endif
@@ -849,4 +853,4 @@ void fnHttpClient::set_header_value(const char *name, const char *value)
849853
it->second = std::string(value);
850854
}
851855

852-
}
856+
}

lib/meatloaf/network/http.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -392,20 +392,19 @@ int MeatHttpClient::openAndFetchHeaders(esp_http_client_method_t meth, int resum
392392
return 0;
393393

394394
mstr::replaceAll(url, " ", "%20");
395-
esp_http_client_config_t config = {
396-
.url = url.c_str(),
397-
.auth_type = HTTP_AUTH_TYPE_BASIC,
398-
.user_agent = USER_AGENT,
399-
.method = meth,
400-
.timeout_ms = 10000,
401-
.max_redirection_count = 10,
402-
.event_handler = _http_event_handler,
403-
.user_data = this,
404-
.keep_alive_enable = true,
405-
.keep_alive_idle = 10,
406-
.keep_alive_interval = 1
407-
};
408-
395+
esp_http_client_config_t config;
396+
memset(&config, 0, sizeof(config));
397+
config.url = url.c_str();
398+
config.auth_type = HTTP_AUTH_TYPE_BASIC;
399+
config.user_agent = USER_AGENT;
400+
config.method = meth;
401+
config.timeout_ms = 10000;
402+
config.max_redirection_count = 10;
403+
config.event_handler = _http_event_handler;
404+
config.user_data = this;
405+
config.keep_alive_enable = true;
406+
config.keep_alive_idle = 10;
407+
config.keep_alive_interval = 1;
409408
//Debug_printv("HTTP Init url[%s]", url.c_str());
410409
_http = esp_http_client_init(&config);
411410

lib/meatloaf/wrappers/iec_buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void oiecstream::putUtf8(U8Char* codePoint) {
135135
//Serial.printf("%c",codePoint->toPetscii());
136136
//Debug_printv("oiecstream calling put");
137137
auto c = codePoint->toPetscii();
138-
put(codePoint->toPetscii());
138+
put(c);
139139
}
140140

141141
// void oiecstream::writeLn(std::string line) {
@@ -153,4 +153,4 @@ void oiecstream::putUtf8(U8Char* codePoint) {
153153

154154
// (*this) << converted;
155155
// }
156-
#endif /* BUILD_IEC */
156+
#endif /* BUILD_IEC */

0 commit comments

Comments
 (0)