@@ -91,7 +91,7 @@ static const char *imx25_ccm_reg_name(uint32_t reg)
case IMX25_CCM_LPIMR1_REG:
return "lpimr1";
default:
- sprintf(unknown, "[%u ?]", reg);
+ snprintf(unknown, sizeof(unknown), "[%u ?]", reg);
return unknown;
}
}
@@ -89,7 +89,7 @@ static const char *imx31_ccm_reg_name(uint32_t reg)
case IMX31_CCM_PDR2_REG:
return "PDR2";
default:
- sprintf(unknown, "[%u ?]", reg);
+ snprintf(unknown, sizeof(unknown), "[%u ?]", reg);
return unknown;
}
}
@@ -85,7 +85,7 @@ static const char *imx6_ccm_reg_name(uint32_t reg)
case CCM_CMEOR:
return "CMEOR";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -224,7 +224,7 @@ static const char *imx6_analog_reg_name(uint32_t reg)
case USB_ANALOG_DIGPROG:
return "USB_ANALOG_DIGPROG";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -68,7 +68,7 @@ static const char *imx6_src_reg_name(uint32_t reg)
case SRC_GPR10:
return "SRC_GPR10";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -143,7 +143,7 @@ static const char *imx6ul_ccm_reg_name(uint32_t reg)
case CCM_CMEOR:
return "CMEOR";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -274,7 +274,7 @@ static const char *imx6ul_analog_reg_name(uint32_t reg)
case USB_ANALOG_DIGPROG:
return "USB_ANALOG_DIGPROG";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -75,7 +75,7 @@ static const char *imx7_src_reg_name(uint32_t reg)
case SRC_GPR10:
return "SRC_GPR10";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
@@ -41,7 +41,7 @@
static const char *imx_default_reg_name(IMXFECState *s, uint32_t index)
{
static char tmp[20];
- sprintf(tmp, "index %d", index);
+ snprintf(tmp, sizeof(tmp), "index %d", index);
return tmp;
}
@@ -53,7 +53,7 @@ static const char *imx_spi_reg_name(uint32_t reg)
case ECSPI_MSGDATA:
return "ECSPI_MSGDATA";
default:
- sprintf(unknown, "%u ?", reg);
+ snprintf(unknown, sizeof(unknown), "%u ?", reg);
return unknown;
}
}
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/misc/imx25_ccm.c | 2 +- hw/misc/imx31_ccm.c | 2 +- hw/misc/imx6_ccm.c | 4 ++-- hw/misc/imx6_src.c | 2 +- hw/misc/imx6ul_ccm.c | 4 ++-- hw/misc/imx7_src.c | 2 +- hw/net/imx_fec.c | 2 +- hw/ssi/imx_spi.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)