This is an automated email from Gerrit.

"Jan Matyas <jan.mat...@codasip.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/8069

-- gerrit

commit 355d64394d5991b949a623277a51732cb528f764
Author: Jan Matyas <jan.mat...@codasip.com>
Date:   Fri Jan 12 12:52:00 2024 +0100

    drivers/jtag_vpi: Use "packed" struct for jtag_vpi packets
    
    Use "packed" attribute on the struct that describes packets
    of the jtag_vpi protocol. This is to avoid unwanted padding
    in the structure that might happen under some compiler settings.
    
    I have not observed any padding issue in jtag_vpi so far and
    this change is just for an additional safety.
    
    Change-Id: I17ea443c02d3ea3b6080c59816b43680fc3cb936
    Signed-off-by: Jan Matyas <jan.mat...@codasip.com>

diff --git a/src/jtag/drivers/jtag_vpi.c b/src/jtag/drivers/jtag_vpi.c
index c2b3b08083..ddace3d125 100644
--- a/src/jtag/drivers/jtag_vpi.c
+++ b/src/jtag/drivers/jtag_vpi.c
@@ -49,7 +49,7 @@ static int sockfd;
 static struct sockaddr_in serv_addr;
 
 /* One jtag_vpi "packet" as sent over a TCP channel. */
-struct vpi_cmd {
+struct __attribute__((__packed__)) vpi_cmd {
        union {
                uint32_t cmd;
                unsigned char cmd_buf[4];

-- 

Reply via email to