city_generator2

Generated conformal 3D meshes representing a city
git clone git://git.meso-star.fr/city_generator2.git
Log | Files | Refs | README | LICENSE

commit dd5a46f9a455d86d3ec18b44e5894d64b86c895e
parent 50d8243986d301803436c7dfb008d461d909be68
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 31 May 2024 17:33:30 +0200

Fix warnings linked to libcyaml and C standard

Diffstat:
Mconfig.mk | 2+-
Msrc/cg.h | 3++-
Msrc/cg_catalog_parsing.c | 3+--
Msrc/cg_city_parsing.c | 3+--
Msrc/cg_city_parsing_schemas.h | 3+--
Msrc/cg_construction_mode_0_parsing_schemas.h | 2+-
Msrc/cg_construction_mode_1_parsing_schemas.h | 2+-
Msrc/cg_construction_modes_parsing_schemas.h | 2+-
Asrc/cg_cyaml.h | 31+++++++++++++++++++++++++++++++
Msrc/cg_main.c | 3+--
10 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/config.mk b/config.mk @@ -89,7 +89,7 @@ CFLAGS_HARDENED =\ -fstack-protector-strong CFLAGS_COMMON =\ - -std=c89\ + -std=c99\ -pedantic\ -fvisibility=hidden\ -fstrict-aliasing\ diff --git a/src/cg.h b/src/cg.h @@ -20,8 +20,9 @@ #ifndef CG_H #define CG_H +#include "cg_cyaml.h" + #include <rsys/rsys.h> -#include <cyaml/cyaml.h> #define ERR(Expr) if((res = (Expr)) != RES_OK) goto error; else (void)0 diff --git a/src/cg_catalog_parsing.c b/src/cg_catalog_parsing.c @@ -23,13 +23,12 @@ #include "cg_construction_mode_0_parsing_schemas.h" #include "cg_construction_mode_1_parsing_schemas.h" #include "cg_city_parsing_schemas.h" +#include "cg_cyaml.h" #include <rsys/logger.h> #include <rsys/str.h> #include <rsys/clock_time.h> -#include <cyaml/cyaml.h> - static const struct cyaml_schema_value* get_schema_from_parsed_cmode (const enum parsed_cmode_type parsed_cmode) diff --git a/src/cg_city_parsing.c b/src/cg_city_parsing.c @@ -22,6 +22,7 @@ #include "cg_city_parsing_schemas.h" #include "cg_ground.h" #include "cg_city.h" +#include "cg_cyaml.h" #include <star/scpr.h> @@ -30,8 +31,6 @@ #include <rsys/mem_allocator.h> #include <rsys/clock_time.h> -#include <cyaml/cyaml.h> - #include <stdio.h> res_T diff --git a/src/cg_city_parsing_schemas.h b/src/cg_city_parsing_schemas.h @@ -21,11 +21,10 @@ #define FG_CITY_PARSING_SCHEMAS__ #include "cg_construction_modes_parsing_schemas.h" +#include "cg_cyaml.h" #include <rsys/str.h> -#include <cyaml/cyaml.h> - struct mem_allocator; struct logger; diff --git a/src/cg_construction_mode_0_parsing_schemas.h b/src/cg_construction_mode_0_parsing_schemas.h @@ -20,7 +20,7 @@ #ifndef FG_MODE0_PARSING_SCHEMAS__ #define FG_MODE0_PARSING_SCHEMAS__ -#include <cyaml/cyaml.h> +#include "cg_cyaml.h" struct parsed_dataset_cmode_0 { char* name; diff --git a/src/cg_construction_mode_1_parsing_schemas.h b/src/cg_construction_mode_1_parsing_schemas.h @@ -20,7 +20,7 @@ #ifndef FG_MODE1_PARSING_SCHEMAS__ #define FG_MODE1_PARSING_SCHEMAS__ -#include <cyaml/cyaml.h> +#include "cg_cyaml.h" #include <rsys/str.h> diff --git a/src/cg_construction_modes_parsing_schemas.h b/src/cg_construction_modes_parsing_schemas.h @@ -20,7 +20,7 @@ #ifndef FG_CMODES_PARSING_SCHEMAS__ #define FG_CMODES_PARSING_SCHEMAS__ -#include <cyaml/cyaml.h> +#include "cg_cyaml.h" /********************************************************/ /* Types used for parsing and to define parsing schemas */ diff --git a/src/cg_cyaml.h b/src/cg_cyaml.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2022 Université de Pau et des Pays de l'Adour UPPA + * Copyright (C) 2022 CNRS + * Copyright (C) 2022 Sorbonne Université + * Copyright (C) 2022 Université Paul Sabatier + * Copyright (C) 2022 |Meso|Star> (contact@meso-star.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, either version 3 of the License, or + * (at your option) any later version. + * + * 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, see <http://www.gnu.org/licenses/>. */ + +#ifndef CG_CYAML_H +#define CG_CYAML_H + +#include <rsys/rsys.h> + +#ifdef COMPILER_GCC + #pragma GCC system_header +#endif + +#include <cyaml/cyaml.h> + +#endif /* CG_CYAML_H */ diff --git a/src/cg_main.c b/src/cg_main.c @@ -25,8 +25,7 @@ #include "cg_catalog.h" #include "cg_catalog_parsing.h" #include "cg_vertex_denoiser.h" - -#include <cyaml/cyaml.h> +#include "cg_cyaml.h" #include <rsys/rsys.h> #include <rsys/clock_time.h>