Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / bitfield / test_bitfield.c
index 558e34196b668c5c0997ae513b66e9a7a99208a3..f0b44821e733de03ef4faf788cd088d5191a4050 100644 (file)
@@ -1,22 +1,9 @@
 /*
- * test-bitfield.c
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * BabelTrace - bitfield test program
- *
- * Copyright 2010-2019 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
+ * Copyright (C) 2010-2019 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * BabelTrace - bitfield test program
  */
 
 #include "compat/bitfield.h"
@@ -30,8 +17,9 @@ unsigned int glob;
 
 /*
  * This function is only declared to show the size of a bitfield write in
- * objdump.
+ * objdump.  The declaration is there to avoid a -Wmissing-prototypes warning.
  */
+void fct(void);
 void fct(void)
 {
        bt_bitfield_write(&glob, unsigned int, 12, 15, 0x12345678);
@@ -148,6 +136,7 @@ do {                                        \
        (val) != (ref);                                                         \
 })
 
+static
 void run_test_unsigned_write(unsigned int src_ui, unsigned long long src_ull)
 {
        unsigned int nrbits_ui, nrbits_ull;
@@ -270,6 +259,7 @@ void run_test_unsigned_write(unsigned int src_ui, unsigned long long src_ull)
        pass(UNSIGNED_LONG_LONG_WRITE_TEST_DESC_FMT_STR, src_ull);
 }
 
+static
 void run_test_unsigned_read(unsigned int src_ui, unsigned long long src_ull)
 {
        unsigned int nrbits_ui, nrbits_ull, readval_ui;
@@ -392,12 +382,14 @@ void run_test_unsigned_read(unsigned int src_ui, unsigned long long src_ull)
        pass(UNSIGNED_LONG_LONG_READ_TEST_DESC_FMT_STR, src_ull);
 }
 
+static
 void run_test_unsigned(unsigned int src_ui, unsigned long long src_ull)
 {
        run_test_unsigned_write(src_ui, src_ull);
        run_test_unsigned_read(src_ui, src_ull);
 }
 
+static
 void run_test_signed_write(int src_i, long long src_ll)
 {
        unsigned int nrbits_i, nrbits_ll;
@@ -528,6 +520,7 @@ void run_test_signed_write(int src_i, long long src_ll)
        pass(SIGNED_LONG_LONG_WRITE_TEST_DESC_FMT_STR, src_ll);
 }
 
+static
 void run_test_signed_read(int src_i, long long src_ll)
 {
        unsigned int nrbits_i, nrbits_ll;
@@ -659,12 +652,14 @@ void run_test_signed_read(int src_i, long long src_ll)
        pass(SIGNED_LONG_LONG_READ_TEST_DESC_FMT_STR, src_ll);
 }
 
+static
 void run_test_signed(int src_i, long long src_ll)
 {
        run_test_signed_write(src_i, src_ll);
        run_test_signed_read(src_i, src_ll);
 }
 
+static
 void run_test(void)
 {
        int i;
This page took 0.02488 seconds and 4 git commands to generate.