aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch/common
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/arch/common')
-rw-r--r--hardinfo2/arch/common/blowfish.h9
-rw-r--r--hardinfo2/arch/common/fib.h6
-rw-r--r--hardinfo2/arch/common/md5.h9
-rw-r--r--hardinfo2/arch/common/raytrace.h6
-rw-r--r--hardinfo2/arch/common/sha1.h9
-rw-r--r--hardinfo2/arch/common/zlib.h16
6 files changed, 12 insertions, 43 deletions
diff --git a/hardinfo2/arch/common/blowfish.h b/hardinfo2/arch/common/blowfish.h
index 07160690..ceec7a96 100644
--- a/hardinfo2/arch/common/blowfish.h
+++ b/hardinfo2/arch/common/blowfish.h
@@ -18,7 +18,7 @@
#include <blowfish.h>
-gchar *
+static void
benchmark_fish(void)
{
BLOWFISH_CTX ctx;
@@ -39,8 +39,7 @@ benchmark_fish(void)
bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
- return g_strdup("[Error]\n"
- PREFIX "benchmark.data not found=\n");
+ return;
}
shell_view_set_enabled(FALSE);
@@ -63,8 +62,4 @@ benchmark_fish(void)
g_free(bdata_path);
bench_results[BENCHMARK_BLOWFISH] = elapsed;
-
- gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n"
- "<i>This Machine</i>=%.2f\n", elapsed);
- return benchmark_include_results(retval, "CPU Blowfish");
}
diff --git a/hardinfo2/arch/common/fib.h b/hardinfo2/arch/common/fib.h
index e676e38e..645002fa 100644
--- a/hardinfo2/arch/common/fib.h
+++ b/hardinfo2/arch/common/fib.h
@@ -26,7 +26,7 @@ fib(gulong n)
return fib(n - 1) + fib(n - 2);
}
-static gchar *
+static void
benchmark_fib(void)
{
GTimer *timer = g_timer_new();
@@ -45,8 +45,4 @@ benchmark_fib(void)
g_timer_destroy(timer);
bench_results[BENCHMARK_FIB] = elapsed;
-
- gchar *retval = g_strdup_printf("[Results]\n"
- "<i>This Machine</i>=%.3f s\n", elapsed);
- return benchmark_include_results(retval, "CPU Fibonacci");
}
diff --git a/hardinfo2/arch/common/md5.h b/hardinfo2/arch/common/md5.h
index 601eef94..95d683bd 100644
--- a/hardinfo2/arch/common/md5.h
+++ b/hardinfo2/arch/common/md5.h
@@ -18,7 +18,7 @@
#include <md5.h>
-gchar *
+static void
benchmark_md5(void)
{
struct MD5Context ctx;
@@ -36,8 +36,7 @@ benchmark_md5(void)
bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
- return g_strdup("[Error]\n"
- PREFIX "benchmark.data not found=\n");
+ return;
}
shell_view_set_enabled(FALSE);
@@ -60,9 +59,5 @@ benchmark_md5(void)
g_free(bdata_path);
bench_results[BENCHMARK_MD5] = 312.0 / elapsed;
-
- gchar *retval = g_strdup_printf("[Results]\n"
- "<i>This Machine</i>=%.2f MiB/s\n", 312.0 / elapsed);
- return benchmark_include_results_reverse(retval, "CPU MD5");
}
diff --git a/hardinfo2/arch/common/raytrace.h b/hardinfo2/arch/common/raytrace.h
index d574779d..af9f2afa 100644
--- a/hardinfo2/arch/common/raytrace.h
+++ b/hardinfo2/arch/common/raytrace.h
@@ -18,7 +18,7 @@
void fbench(); /* fbench.c */
-static gchar *
+static void
benchmark_raytrace(void)
{
int i;
@@ -42,9 +42,5 @@ benchmark_raytrace(void)
g_timer_destroy(timer);
bench_results[BENCHMARK_RAYTRACE] = elapsed;
-
- gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n"
- "<i>This Machine</i>=%.2f\n", elapsed);
- return benchmark_include_results(retval, "CPU Raytracing");
}
diff --git a/hardinfo2/arch/common/sha1.h b/hardinfo2/arch/common/sha1.h
index 79cfebcf..3b7f7652 100644
--- a/hardinfo2/arch/common/sha1.h
+++ b/hardinfo2/arch/common/sha1.h
@@ -17,7 +17,7 @@
*/
#include <sha1.h>
-gchar *
+static void
benchmark_sha1(void)
{
SHA1_CTX ctx;
@@ -35,8 +35,7 @@ benchmark_sha1(void)
bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
- return g_strdup("[Error]\n"
- PREFIX "benchmark.data not found=\n");
+ return;
}
shell_view_set_enabled(FALSE);
@@ -59,9 +58,5 @@ benchmark_sha1(void)
g_free(bdata_path);
bench_results[BENCHMARK_SHA1] = 312.0 / elapsed;
-
- gchar *retval = g_strdup_printf("[Results]\n"
- "<i>This Machine</i>=%.2f MiB/s\n", 312.0 / elapsed);
- return benchmark_include_results_reverse(retval, "CPU SHA1");
}
diff --git a/hardinfo2/arch/common/zlib.h b/hardinfo2/arch/common/zlib.h
index 3a091ac0..96d20944 100644
--- a/hardinfo2/arch/common/zlib.h
+++ b/hardinfo2/arch/common/zlib.h
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-static gchar *
+static void
benchmark_zlib(void)
{
GModule *libz;
@@ -30,8 +30,7 @@ benchmark_zlib(void)
libz = g_module_open("/usr/lib/libz.so", G_MODULE_BIND_LAZY);
if (!libz) {
g_warning("Cannot load ZLib: %s", g_module_error());
- return g_strdup("[Error]\n"
- "ZLib not found=");
+ return;
}
}
@@ -39,8 +38,7 @@ benchmark_zlib(void)
|| !g_module_symbol(libz, "compressBound", (gpointer) & compressBound)) {
g_module_close(libz);
- return g_strdup("[Error]\n"
- "Invalid Z-Lib found=");
+ return;
}
}
@@ -56,8 +54,7 @@ benchmark_zlib(void)
bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
- return g_strdup("[Error]\n"
- PREFIX "benchmark.data not found=\n");
+ return;
}
shell_status_update("Compressing 64MB with default options...");
@@ -82,9 +79,4 @@ benchmark_zlib(void)
g_free(bdata_path);
bench_results[BENCHMARK_ZLIB] = 65536.0 / elapsed;
-
- gchar *retval = g_strdup_printf("[Results]\n"
- "<i>This Machine</i>=%.3f KiB/s\n",
- 65536.0 / elapsed);
- return benchmark_include_results_reverse(retval, "CPU ZLib");
}