fix tests for gcc

This commit is contained in:
mek_x 2014-04-23 23:05:33 +02:00
parent 116fb82670
commit 92a46f24e2

10
tests.c
View File

@ -6,6 +6,8 @@
* published by Sam Hocevar. See the COPYING file for more details.
*/
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#include <stdlib.h>
#include <string.h>
#include <math.h>
@ -288,7 +290,7 @@ START_TEST(test_minmea_parse_rmc1)
{
const char *sentence = "$GPRMC,081836.75,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E";
struct minmea_sentence_rmc frame = {};
struct minmea_sentence_rmc expected = {
static const struct minmea_sentence_rmc expected = {
.time = { 8, 18, 36, 750000 },
.valid = true,
.latitude = -375165,
@ -313,7 +315,7 @@ START_TEST(test_minmea_parse_rmc2)
{
const char *sentence = "$GPRMC,,A,3751.65,N,14507.36,W,,,,,";
struct minmea_sentence_rmc frame = {};
struct minmea_sentence_rmc expected = {
static const struct minmea_sentence_rmc expected = {
.time = { -1, -1, -1, -1 },
.valid = true,
.latitude = 375165,
@ -332,7 +334,7 @@ START_TEST(test_minmea_parse_gga1)
{
const char *sentence = "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47";
struct minmea_sentence_gga frame = {};
struct minmea_sentence_gga expected = {
static const struct minmea_sentence_gga expected = {
.time = { 12, 35, 19, 0 },
.latitude = 4807038,
.latitude_scale = 1000,
@ -360,7 +362,7 @@ START_TEST(test_minmea_parse_gsa1)
{
const char *sentence = "$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39";
struct minmea_sentence_gsa frame = {};
struct minmea_sentence_gsa expected = {
static const struct minmea_sentence_gsa expected = {
.mode = MINMEA_GPGSA_MODE_AUTO,
.fix_type = MINMEA_GPGSA_FIX_3D,
.sats = { 4, 5, 0, 9, 12, 0, 0, 24, 0, 0, 0, 0 },