fix: don't use plain strings in vars as printf formats
This commit is contained in:
@@ -62,7 +62,7 @@ guint64 SwapBytes64(guint64 in)
|
||||
*/
|
||||
|
||||
void print_hex(char *label, guint8 *values, int n)
|
||||
{ PrintCLI(label);
|
||||
{ PrintCLI("%s", label);
|
||||
|
||||
while(n--)
|
||||
PrintCLI("%02x ",*values++);
|
||||
|
||||
@@ -707,7 +707,7 @@ void AboutTextWithLink(GtkWidget *parent, char *text, char *action)
|
||||
g_free(utf);
|
||||
}
|
||||
}
|
||||
else AboutText(parent, head);
|
||||
else AboutText(parent, "%s", head);
|
||||
|
||||
if(end_of_line) head = end_of_line+1;
|
||||
else break;
|
||||
@@ -739,7 +739,7 @@ void AboutDialog()
|
||||
text = g_strdup_printf("<span weight=\"bold\" size=\"xx-large\">dvdisaster</span><i> "
|
||||
"Version %s</i>",
|
||||
Closure->cookedVersion);
|
||||
AboutText(vbox, text);
|
||||
AboutText(vbox, "%s", text);
|
||||
g_free(text);
|
||||
|
||||
#ifdef MODIFIED_SOURCE
|
||||
|
||||
@@ -1339,7 +1339,7 @@ void fill_gap(read_closure *rc)
|
||||
ChangeSpiralCursor(Closure->readAdaptiveSpiral, -1);
|
||||
}
|
||||
#endif
|
||||
PrintCLI(t);
|
||||
PrintCLI("%s", t);
|
||||
g_free(t);
|
||||
|
||||
/*** Seek to end of image */
|
||||
@@ -1615,7 +1615,7 @@ reopen_image:
|
||||
{ char *t = _("\nSufficient data for reconstructing the image is available.\n");
|
||||
|
||||
if(rc->readMode != IMAGE_ONLY)
|
||||
{ PrintLog(t);
|
||||
{ PrintLog("%s", t);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->greenText);
|
||||
@@ -1947,7 +1947,7 @@ reread:
|
||||
|
||||
print_progress(rc, TRUE);
|
||||
if(rc->readMode != IMAGE_ONLY)
|
||||
{ PrintLog(t);
|
||||
{ PrintLog("%s", t);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode && rc->ei)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
@@ -2128,7 +2128,7 @@ finished:
|
||||
if(rc->readMode == IMAGE_ONLY)
|
||||
{ if(rc->readable == rc->expectedSectors)
|
||||
{ char *t = _("\nGood! All sectors have been read.\n");
|
||||
PrintLog(t);
|
||||
PrintLog("%s", t);
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
SetAdaptiveReadFootline(t, Closure->foreground);
|
||||
|
||||
@@ -1087,7 +1087,7 @@ reread:
|
||||
g_mutex_lock(rc->mutex);
|
||||
if(rc->workerError) /* something went wrong in the worker thread */
|
||||
{ g_mutex_unlock(rc->mutex);
|
||||
Stop(rc->workerError);
|
||||
Stop("%s", rc->workerError);
|
||||
}
|
||||
while(rc->bufState[rc->readPtr] != BUF_EMPTY)
|
||||
{ g_cond_wait(rc->canRead, rc->mutex);
|
||||
@@ -1240,7 +1240,7 @@ reread:
|
||||
g_mutex_lock(rc->mutex);
|
||||
if(rc->workerError) /* something went wrong in the worker thread */
|
||||
{ g_mutex_unlock(rc->mutex);
|
||||
Stop(rc->workerError);
|
||||
Stop("%s", rc->workerError);
|
||||
}
|
||||
|
||||
while(rc->bufState[rc->readPtr] != BUF_EMPTY)
|
||||
|
||||
@@ -322,8 +322,8 @@ void RS01Fix(Image *image)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Image file appears to be truncated.\n"
|
||||
"Consider completing it with another reading pass before going on.\n"), NULL);
|
||||
"%s",_("Image file appears to be truncated.\n"
|
||||
"Consider completing it with another reading pass before going on.\n"));
|
||||
if(!answer)
|
||||
{
|
||||
#ifndef CLI
|
||||
|
||||
@@ -946,7 +946,7 @@ skip_ecc:
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccResult),
|
||||
|
||||
@@ -1143,8 +1143,8 @@ void RS02Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Using redundancies below 20%% may not give\n"
|
||||
"the expected data loss protection.\n"), NULL);
|
||||
"%s", _("Using redundancies below 20% may not give\n"
|
||||
"the expected data loss protection.\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
|
||||
@@ -917,7 +917,7 @@ void RS02Verify(Image *image)
|
||||
SetLabelText(GTK_LABEL(wl->cmpImageMd5Sum), "%s", data_missing ? "-" : data_digest);
|
||||
|
||||
if(img_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), img_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), "%s", img_advice);
|
||||
g_free(img_advice);
|
||||
}
|
||||
else
|
||||
@@ -935,7 +935,7 @@ void RS02Verify(Image *image)
|
||||
#endif
|
||||
{
|
||||
if(img_advice)
|
||||
{ PrintLog(img_advice);
|
||||
{ PrintLog("%s", img_advice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,7 +1170,7 @@ continue_with_ecc:
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else
|
||||
@@ -1190,7 +1190,7 @@ continue_with_ecc:
|
||||
else
|
||||
#endif
|
||||
{ if(ecc_advice)
|
||||
{ PrintLog(ecc_advice);
|
||||
{ PrintLog("%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1406,8 +1406,8 @@ void RS03Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("Using redundancies below 20%% may not give\n"
|
||||
"the expected data loss protection.\n"), NULL);
|
||||
"%s", _("Using redundancies below 20% may not give\n"
|
||||
"the expected data loss protection.\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
@@ -1422,8 +1422,8 @@ void RS03Create(void)
|
||||
{ int answer;
|
||||
|
||||
answer = ModalWarningOrCLI(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, NULL,
|
||||
_("BD-R size with no defect management enabled,\n"
|
||||
"remember it should you need to repair this image later!\n"), NULL);
|
||||
"%s", _("BD-R size with no defect management enabled,\n"
|
||||
"remember it should you need to repair this image later!\n"));
|
||||
|
||||
if(!answer)
|
||||
abort_encoding(ec, FALSE);
|
||||
|
||||
@@ -945,7 +945,7 @@ void RS03Verify(Image *image)
|
||||
#ifndef CLI
|
||||
if(Closure->guiMode)
|
||||
{ if(ecc_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), ecc_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpEccResult), "%s", ecc_advice);
|
||||
g_free(ecc_advice);
|
||||
}
|
||||
else SetLabelText(GTK_LABEL(wl->cmpEccResult),
|
||||
@@ -1379,7 +1379,7 @@ void RS03Verify(Image *image)
|
||||
if(Closure->guiMode)
|
||||
{
|
||||
if(img_advice)
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), img_advice);
|
||||
{ SetLabelText(GTK_LABEL(wl->cmpImageResult), "%s", img_advice);
|
||||
g_free(img_advice);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2009,7 +2009,7 @@ static gint64 query_size(Image *image)
|
||||
}
|
||||
|
||||
g_string_append_printf(warning, _("Final decision: %s\n\n"), decision_msg);
|
||||
LogWarning(warning->str);
|
||||
LogWarning("%s", warning->str);
|
||||
|
||||
g_string_free(warning, TRUE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user