mirror of
https://github.com/FAUSheppy/colorredstderr-mirror
synced 2025-12-10 00:48:33 +01:00
tests: Fix warnings about unused parameters.
This commit is contained in:
@@ -17,15 +17,17 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "../src/compiler.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argv;
|
||||
|
||||
int main(int argc, char **argv unused) {
|
||||
fprintf(stderr, "write to stderr: %d\n", argc);
|
||||
printf("write to stdout\n");
|
||||
fflush(stdout);
|
||||
|
||||
@@ -17,12 +17,17 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define _GNU_SOURCE /* for program_invocation_name */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
|
||||
#include "../src/compiler.h"
|
||||
|
||||
|
||||
void (*error_print_progname)(void);
|
||||
|
||||
|
||||
@@ -31,7 +36,7 @@ static void print_prognmae(void) {
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc unused, char **argv unused) {
|
||||
program_invocation_name = "./example_error";
|
||||
|
||||
error(0, 0, "<message>");
|
||||
|
||||
@@ -17,11 +17,15 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../src/compiler.h"
|
||||
|
||||
|
||||
#define MAGIC "@RUN_"
|
||||
#define MAGIC_LENGTH (strlen(MAGIC))
|
||||
@@ -75,7 +79,7 @@ static void dump(char *argv[]) {
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc unused, char **argv) {
|
||||
char argv0[strlen(argv[0]) + MAGIC_LENGTH + 3 + 1];
|
||||
|
||||
char *old_ldpreload = getenv("LD_PRELOAD");
|
||||
|
||||
@@ -17,12 +17,17 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
#include "../src/compiler.h"
|
||||
|
||||
|
||||
int main(int argc unused, char **argv unused) {
|
||||
pid_t pid;
|
||||
|
||||
fprintf(stderr, "Before vfork().\n");
|
||||
|
||||
Reference in New Issue
Block a user