summaryrefslogtreecommitdiff
path: root/tools/ivyprobe.c
diff options
context:
space:
mode:
authorbustico2014-12-23 09:35:46 +0000
committerbustico2014-12-23 09:35:46 +0000
commit2d66c27090d6654bbda21f7cc8351b9a64f9b4f9 (patch)
treecc60f48c22011cd150c13ed9a7133b0ee937affc /tools/ivyprobe.c
parent538b53a4a610b3a9cf24c3108ab14cf36377a532 (diff)
downloadivy-c-2d66c27090d6654bbda21f7cc8351b9a64f9b4f9.zip
ivy-c-2d66c27090d6654bbda21f7cc8351b9a64f9b4f9.tar.gz
ivy-c-2d66c27090d6654bbda21f7cc8351b9a64f9b4f9.tar.bz2
ivy-c-2d66c27090d6654bbda21f7cc8351b9a64f9b4f9.tar.xz
Author: Piotr Esden-Tempski <piotr@esden.net>
Date: Mon Dec 22 18:54:08 2014 -0800 Added toplevel README.md file. Author: Piotr Esden-Tempski <piotr@esden.net> Date: Mon Dec 22 18:38:50 2014 -0800 Added missing LIB variable for Makefile.osx Date: Mon Dec 22 18:30:20 2014 -0800 Bumped version. Author: Piotr Esden-Tempski <piotr@esden.net> Date: Mon Dec 22 18:15:14 2014 -0800 Switched from explicit naming of *.pc files to wildcard. Author: Piotr Esden-Tempski <piotr@esden.net> Date: Mon Dec 22 18:06:52 2014 -0800 A bunch of pkg-config file improvements. - Automatically finding *.pc.in files and running pattern replacements on them. - Replaced static paths in ivy.pc.in with @@ patterns. - Removed @DESTDIR@ as this path should not appear in any of the installed files, it is only used to direct the build system where to put the files. See deb package build process. - Moved LIB variables to Libs and INC to Cflags. - pkgconfiginstall target now depends on pkgconfig target. Otherwise the *.pc files might not be generated when make install is invoked. - Added missing MAJOR and MINOR variable definitions in Makefile.osx. Author: Piotr Esden-Tempski <piotr@esden.net> Date: Mon Dec 22 17:23:54 2014 -0800 Updated the ivy pkgconfig to use the same patterns as the glib one. Author: Felix Ruess <felix.ruess@gmail.com> Date: Fri Nov 14 15:06:18 2014 +0100 add pkg-config file for ivy Author: Piotr Esden-Tempski <piotr@esden.net> Date: Mon Dec 22 03:48:57 2014 -0800 Fixing the format security warning. The warning is a valid security issue, allowing for access to memory regions not intended for public use. For reference please see: https://fedoraproject.org/wiki/Format-Security-FAQ
Diffstat (limited to 'tools/ivyprobe.c')
-rw-r--r--tools/ivyprobe.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/tools/ivyprobe.c b/tools/ivyprobe.c
index 8b164a1..0074192 100644
--- a/tools/ivyprobe.c
+++ b/tools/ivyprobe.c
@@ -171,15 +171,7 @@ void HandleStdin (Channel channel, IVY_HANDLE fd, void *data)
printf("Error compiling '%s', %s, not bound\n", arg, errbuf);
} else {
IvyBindingFree( binding );
-
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
-#endif
- IvyBindMsg (Callback, NULL, arg);
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic pop
-#endif
+ IvyBindMsg (Callback, NULL, "%s", arg);
}
}
@@ -243,14 +235,7 @@ void HandleStdin (Channel channel, IVY_HANDLE fd, void *data)
}
} else {
cmd = strtok (buf, "\n");
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
-#endif
- err = IvySendMsg (cmd);
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic pop
-#endif
+ err = IvySendMsg ("%s", cmd);
printf("-> Sent to %d peer%s\n", err, err == 1 ? "" : "s");
}
}
@@ -355,14 +340,7 @@ void BindMsgOfFile( const char * regex_file )
if ( size > 1 )
{
line[size-1] = '\0'; /* supress \n */
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
-#endif
- IvyBindMsg (Callback, NULL, line);
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic pop
-#endif
+ IvyBindMsg (Callback, NULL, "%s", line);
}
}
}
@@ -455,14 +433,7 @@ int main(int argc, char *argv[])
for (; optind < argc; optind++)
{
printf("Binding to '%s'\n", argv[optind] );
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
-#endif
- IvyBindMsg (Callback, NULL, argv[optind]);
-#if defined(__GNUC__) && __GNUC_PREREQ(4,7)
-#pragma GCC diagnostic pop
-#endif
+ IvyBindMsg (Callback, NULL, "%s", argv[optind]);
}