Hi Jan,

> > Make the #include'd headers explicit rather than implicit.
> > 
> 
> How did you check that an include is needed (and not others)? Manually?
> Or via something analogous to
> https://github.com/siemens/jailhouse/blob/master/scripts/header_check?

Well, manually while staring at the code :)
It's kind of suspicious for, e.g., env_config_file.h having *no*
#include's and then using CONFIG_PART and char so it's quite apparent
that this is provided implicitly. Then I went finding the appropriate
include files... Same procedure applied to the others.

  Christian


> > Signed-off-by: Christian Storm <[email protected]>
> > ---
> >  include/env_config_file.h       | 2 ++
> >  include/env_config_partitions.h | 3 +++
> >  include/env_disk_utils.h        | 3 +++
> >  include/envdata.h               | 2 ++
> >  4 files changed, 10 insertions(+)
> > 
> > diff --git a/include/env_config_file.h b/include/env_config_file.h
> > index 081c922..7c286da 100644
> > --- a/include/env_config_file.h
> > +++ b/include/env_config_file.h
> > @@ -13,6 +13,8 @@
> >   */
> >  
> >  #pragma once
> > +#include <stdio.h>
> > +#include "env_api.h"
> >  
> >  FILE *open_config_file_from_part(CONFIG_PART *cfgpart, char *mode);
> >  FILE *open_config_file(char *configfilepath, char *mode);
> > diff --git a/include/env_config_partitions.h 
> > b/include/env_config_partitions.h
> > index c6cd033..ca7eeeb 100644
> > --- a/include/env_config_partitions.h
> > +++ b/include/env_config_partitions.h
> > @@ -14,5 +14,8 @@
> >  
> >  #pragma once
> >  
> > +#include <stdbool.h>
> > +#include "env_api.h"
> > +
> >  bool probe_config_partitions(CONFIG_PART *cfgpart);
> >  
> > diff --git a/include/env_disk_utils.h b/include/env_disk_utils.h
> > index eafdb59..d26f905 100644
> > --- a/include/env_disk_utils.h
> > +++ b/include/env_disk_utils.h
> > @@ -14,6 +14,9 @@
> >  
> >  #pragma once
> >  
> > +#include <stdbool.h>
> > +#include "env_api.h"
> > +
> >  char *get_mountpoint(char *devpath);
> >  bool mount_partition(CONFIG_PART *cfgpart);
> >  void unmount_partition(CONFIG_PART *cfgpart);
> > diff --git a/include/envdata.h b/include/envdata.h
> > index e1f6195..458e948 100644
> > --- a/include/envdata.h
> > +++ b/include/envdata.h
> > @@ -14,6 +14,8 @@
> >  
> >  #pragma once
> >  
> > +#include <stdint.h>
> > +
> >  #define FAT_ENV_FILENAME "BGENV.DAT"
> >  #define ENV_STRING_LENGTH 255
> >  
> > 


-- 
Dr. Christian Storm
Siemens AG, Technology, T RDA IOT SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20210108205910.d3e6efumpbp6ehpt%40MD1ZFJVC.ad001.siemens.net.

Reply via email to