• R/O
  • SSH
  • HTTPS

avrdude: Commit


Commit MetaInfo

Revision1454 (tree)
Time2020-01-19 03:10:02
Authorgottfried

Log Message

fixed non standard struct initialize with name

Change Summary

Incremental Difference

--- trunk/buspirate.cpp (revision 1453)
+++ trunk/buspirate.cpp (revision 1454)
@@ -501,16 +501,16 @@
501501
502502 const struct submode submodule_raw =
503503 {
504- .name = "Raw-wire",
505- .enter = 0x05,
506- .entered_format = "RAW%1d",
507- .config = static_cast<char>(0x8C),
504+ /*.name =*/ "Raw-wire",
505+ /*.enter =*/ 0x05,
506+ /*.entered_format =*/ "RAW%1d",
507+ /*.config =*/ static_cast<char>(0x8C),
508508 };
509509 const struct submode submodule_spi =
510510 {
511- .name = "SPI",
512- .enter = 0x01,
513- .entered_format = "SPI%1d",
511+ /*.name =*/ "SPI",
512+ /*.enter =*/ 0x01,
513+ /*.entered_format =*/ "SPI%1d",
514514
515515 /* 1000wxyz - SPI config, w=HiZ(0)/3.3v(1), x=CLK idle, y=CLK edge, z=SMP sample
516516 * we want: 3.3V(1), idle low(0), data change on
@@ -517,7 +517,7 @@
517517 * trailing edge (1), sample in the middle
518518 * of the pulse (0)
519519 * => 0b10001010 = 0x8a */
520- .config = static_cast<char>(0x8A),
520+ /*.config =*/ static_cast<char>(0x8A),
521521 };
522522
523523 if (pgm->flag & BP_FLAG_XPARM_RAWFREQ) {
--- trunk/ser_win32.cpp (revision 1453)
+++ trunk/ser_win32.cpp (revision 1454)
@@ -31,10 +31,12 @@
3131 # include <winsock2.h>
3232 #endif
3333
34+#define WIN32_LEAN_AND_MEAN
3435 #include <windows.h>
3536 #include <stdio.h>
3637 #include <ctype.h> /* for isprint */
3738 #include <errno.h> /* ENOTTY */
39+#include <stdlib.h> /* strtoul exit */
3840
3941 #include "avrdude.h"
4042 #include "libavrdude.h"
@@ -253,7 +255,7 @@
253255 port = newname;
254256 }
255257
256- hComPort = CreateFile(port, GENERIC_READ | GENERIC_WRITE, 0, NULL,
258+ hComPort = CreateFileA(port, GENERIC_READ | GENERIC_WRITE, 0, NULL,
257259 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
258260
259261 if (hComPort == INVALID_HANDLE_VALUE) {
@@ -682,14 +684,14 @@
682684
683685 struct serial_device serial_serdev =
684686 {
685- .open = ser_open,
686- .setspeed = ser_setspeed,
687- .close = ser_close,
688- .send = ser_send,
689- .recv = ser_recv,
690- .drain = ser_drain,
691- .set_dtr_rts = ser_set_dtr_rts,
692- .flags = SERDEV_FL_CANSETSPEED,
687+ /*.open =*/ ser_open,
688+ /*.setspeed =*/ ser_setspeed,
689+ /*.close =*/ ser_close,
690+ /*.send =*/ ser_send,
691+ /*.recv =*/ ser_recv,
692+ /*.drain =*/ ser_drain,
693+ /*.set_dtr_rts =*/ ser_set_dtr_rts,
694+ /*.flags =*/ SERDEV_FL_CANSETSPEED,
693695 };
694696
695697 struct serial_device *serdev = &serial_serdev;
--- trunk/stk500v2.cpp (revision 1453)
+++ trunk/stk500v2.cpp (revision 1454)
@@ -1598,7 +1598,7 @@
15981598
15991599 static int stk500v2_open(PROGRAMMER * pgm, char * port)
16001600 {
1601- union pinfo pinfo = { .baud = 115200 };
1601+ union pinfo pinfo = { /*.baud =*/ 115200 };
16021602
16031603 DEBUG("STK500V2: stk500v2_open()\n");
16041604
@@ -1666,7 +1666,7 @@
16661666
16671667 static int stk600_open(PROGRAMMER * pgm, char * port)
16681668 {
1669- union pinfo pinfo = { .baud = 115200 };
1669+ union pinfo pinfo = { /*.baud =*/ 115200 };
16701670
16711671 DEBUG("STK500V2: stk600_open()\n");
16721672
--- trunk/usb_libusb.cpp (revision 1453)
+++ trunk/usb_libusb.cpp (revision 1454)
@@ -584,14 +584,14 @@
584584 */
585585 struct serial_device usb_serdev =
586586 {
587- .open = usbdev_open,
588- .setspeed = 0,
589- .close = usbdev_close,
590- .send = usbdev_send,
591- .recv = usbdev_recv,
592- .drain = usbdev_drain,
593- .set_dtr_rts = 0,
594- .flags = SERDEV_FL_NONE,
587+ /*.open =*/ usbdev_open,
588+ /*.setspeed =*/ 0,
589+ /*.close =*/ usbdev_close,
590+ /*.send =*/ usbdev_send,
591+ /*.recv =*/ usbdev_recv,
592+ /*.drain =*/ usbdev_drain,
593+ /*.set_dtr_rts =*/ 0,
594+ /*.flags =*/ SERDEV_FL_NONE,
595595 };
596596
597597 /*
@@ -599,14 +599,14 @@
599599 */
600600 struct serial_device usb_serdev_frame =
601601 {
602- .open = usbdev_open,
603- .setspeed = 0,
604- .close = usbdev_close,
605- .send = usbdev_send,
606- .recv = usbdev_recv_frame,
607- .drain = usbdev_drain,
608- .set_dtr_rts = 0,
609- .flags = SERDEV_FL_NONE,
602+ /*.open =*/ usbdev_open,
603+ /*.setspeed =*/ 0,
604+ /*.close =*/ usbdev_close,
605+ /*.send =*/ usbdev_send,
606+ /*.recv =*/ usbdev_recv_frame,
607+ /*.drain =*/ usbdev_drain,
608+ /*.set_dtr_rts =*/ 0,
609+ /*.flags =*/ SERDEV_FL_NONE,
610610 };
611611
612612 #endif /* HAVE_LIBUSB */
Show on old repository browser