1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
Description: __FUNCTION__ is deprecated and throw a pedantic warning when built with c11
Author: Mattia Rizzolo <mattia@debian.org>
Forwarded: https://github.com/stewartsmith/libeatmydata/pull/21
Last-Update: 2020-04-28
--- a/libeatmydata/test/tst-cancel4.c
+++ b/libeatmydata/test/tst-cancel4.c
@@ -113,21 +113,21 @@
tempfd = mkostemp(fname, O_RDONLY);
if (tempfd == -1)
{
- printf ("%s: cannot open %s\n", __FUNCTION__, fname);
+ printf ("%s: cannot open %s\n", __func__, fname);
exit (1);
}
int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
exit (1);
}
r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: 2nd barrier_wait failed\n", __func__);
exit (1);
}
@@ -137,7 +137,7 @@
pthread_cleanup_pop (0);
- printf ("%s: fsync returned\n", __FUNCTION__);
+ printf ("%s: fsync returned\n", __func__);
unlink(fname);
free(fname);
@@ -159,21 +159,21 @@
tempfd = mkostemp(fname, O_RDONLY);
if (tempfd == -1)
{
- printf ("%s: cannot open %s\n", __FUNCTION__, fname);
+ printf ("%s: cannot open %s\n", __func__, fname);
exit (1);
}
int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
exit (1);
}
r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: 2nd barrier_wait failed\n", __func__);
exit (1);
}
@@ -183,7 +183,7 @@
pthread_cleanup_pop (0);
- printf ("%s: fdatasync returned\n", __FUNCTION__);
+ printf ("%s: fdatasync returned\n", __func__);
unlink(fname);
free(fname);
@@ -205,28 +205,28 @@
tempfd = mkostemp(fname, O_RDONLY);
if (tempfd == -1)
{
- printf ("%s: cannot open %s\n", __FUNCTION__, fname);
+ printf ("%s: cannot open %s\n", __func__, fname);
exit (1);
}
void *p = mmap (NULL, 10, PROT_READ, MAP_SHARED, tempfd, 0);
if (p == MAP_FAILED)
{
- printf ("%s: mmap failed\n", __FUNCTION__);
+ printf ("%s: mmap failed\n", __func__);
exit (1);
}
int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
exit (1);
}
r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: 2nd barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: 2nd barrier_wait failed\n", __func__);
exit (1);
}
@@ -236,7 +236,7 @@
pthread_cleanup_pop (0);
- printf ("%s: msync returned\n", __FUNCTION__);
+ printf ("%s: msync returned\n", __func__);
unlink(fname);
free(fname);
@@ -310,7 +310,7 @@
int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
result = 1;
continue;
}
@@ -408,7 +408,7 @@
int r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
result = 1;
continue;
}
@@ -423,7 +423,7 @@
r = pthread_barrier_wait (&b2);
if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
{
- printf ("%s: barrier_wait failed\n", __FUNCTION__);
+ printf ("%s: barrier_wait failed\n", __func__);
result = 1;
continue;
}
|