parent
d9603ff7aa
commit
7f196d4dd6
@ -1 +1,2 @@
|
|||||||
/os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz
|
/os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz
|
||||||
|
/os-autoinst-ff760a31dbdd8a96bd92683bd5ff45633ee149cd.tar.gz
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 97546a9336a1de2f9e6bd6c20dd6f54756ede02e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Williamson <awilliam@redhat.com>
|
|
||||||
Date: Thu, 14 Jan 2016 18:28:36 -0800
|
|
||||||
Subject: [PATCH] use fputs rather than fprintf to avoid 'format not a literal'
|
|
||||||
|
|
||||||
These three identical lines cause the infamous 'format not a
|
|
||||||
string literal and no format arguments' warning in GCC. On
|
|
||||||
many distros (including Fedora) the default compile flags for
|
|
||||||
packages turn this warning into an error.
|
|
||||||
|
|
||||||
I don't think there's a real problem here, because ERR_NOT_
|
|
||||||
ENOUGH_MEMORY is a constant defined in the code. But we should
|
|
||||||
avoid triggering the warning/error in any case.
|
|
||||||
|
|
||||||
https://fedoraproject.org/wiki/Format-Security-FAQ
|
|
||||||
---
|
|
||||||
snd2png/snd2png.cpp | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/snd2png/snd2png.cpp b/snd2png/snd2png.cpp
|
|
||||||
index 0ca7142..d95857e 100644
|
|
||||||
--- a/snd2png/snd2png.cpp
|
|
||||||
+++ b/snd2png/snd2png.cpp
|
|
||||||
@@ -89,7 +89,7 @@ main (int argc, char *argv[])
|
|
||||||
info_in.channels);
|
|
||||||
if (!infile_data)
|
|
||||||
{
|
|
||||||
- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY);
|
|
||||||
+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr);
|
|
||||||
sf_close (fIn);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
@@ -118,7 +118,7 @@ main (int argc, char *argv[])
|
|
||||||
double *fftw_in = (double *) fftw_malloc (sizeof (double) * nDftSamples);
|
|
||||||
if (!fftw_in)
|
|
||||||
{
|
|
||||||
- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY);
|
|
||||||
+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ main (int argc, char *argv[])
|
|
||||||
(fftw_complex *) fftw_malloc (sizeof (fftw_complex) * nDftSamples);
|
|
||||||
if (!fftw_out)
|
|
||||||
{
|
|
||||||
- fprintf (stderr, ERR_NOT_ENOUGH_MEMORY);
|
|
||||||
+ fputs (ERR_NOT_ENOUGH_MEMORY, stderr);
|
|
||||||
sf_close (fIn);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.7.0
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
diff --git a/basetest.pm b/basetest.pm
|
|
||||||
index 8a05ceb..dac0ef1 100755
|
|
||||||
--- a/basetest.pm
|
|
||||||
+++ b/basetest.pm
|
|
||||||
@@ -106,6 +106,7 @@ sub record_screenmatch {
|
|
||||||
screenshot => sprintf("%s-%d.png", $testname, $count),
|
|
||||||
result => 'ok',
|
|
||||||
properties => [@$properties],
|
|
||||||
+ json => $h->{json},
|
|
||||||
};
|
|
||||||
|
|
||||||
# When the needle has the workaround property,
|
|
||||||
@@ -155,9 +156,10 @@ sub _serialize_match {
|
|
||||||
my $candidates;
|
|
||||||
my $diffcount = 0;
|
|
||||||
|
|
||||||
- my $name = $cand->{needle}->{name};
|
|
||||||
+ my $name = $cand->{needle}->{name};
|
|
||||||
+ my $jsonfile = $cand->{needle}->{file};
|
|
||||||
|
|
||||||
- my $h = {name => $name, error => $cand->{error}, area => []};
|
|
||||||
+ my $h = {name => $name, error => $cand->{error}, area => [], json => $jsonfile};
|
|
||||||
for my $a (@{$cand->{area}}) {
|
|
||||||
my $na = {};
|
|
||||||
for my $i (qw/x y w h result/) {
|
|
||||||
diff --git a/needle.pm b/needle.pm
|
|
||||||
index e9da38b..fdb8e85 100755
|
|
||||||
--- a/needle.pm
|
|
||||||
+++ b/needle.pm
|
|
||||||
@@ -37,7 +37,7 @@ sub new {
|
|
||||||
my $json;
|
|
||||||
if (ref $jsonfile eq 'HASH') {
|
|
||||||
$json = $jsonfile;
|
|
||||||
- $jsonfile = join('/', $needledir, $json->{name} . '.json');
|
|
||||||
+ $jsonfile = $json->{file} || join('/', $needledir, $json->{name} . '.json');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
local $/;
|
|
||||||
@@ -238,4 +238,3 @@ sub all {
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
||||||
-
|
|
Loading…
Reference in new issue