diff mbox series

channel_curl: add missing include for sourcetype

Message ID 20180216112043.30006-1-christian.storm@siemens.com
State Accepted
Headers show
Series channel_curl: add missing include for sourcetype | expand

Commit Message

Storm, Christian Feb. 16, 2018, 11:20 a.m. UTC
Add missing #include "swupdate_status.h" for
sourcetype definition.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 include/channel_curl.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic Feb. 16, 2018, 11:24 a.m. UTC | #1
Hi Christian,

On 16/02/2018 12:20, Christian Storm wrote:
> Add missing #include "swupdate_status.h" for
> sourcetype definition.
> 
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>  include/channel_curl.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/channel_curl.h b/include/channel_curl.h
> index c145d7a..2133744 100644
> --- a/include/channel_curl.h
> +++ b/include/channel_curl.h
> @@ -9,6 +9,7 @@
>  #include <json-c/json.h>
>  #include <stdio.h>
>  #include "sslapi.h"
> +#include "swupdate_status.h"
>  
>  /* Curl Channel Implementation Private Header File.
>   *
> 

Should we not have an error from Travis if an header is missing ? Why do
we have not ?

If there is a configuration raising this error, we should add this
configuration to configs/, too, to be sure that build is not broken in
future.

Best regards,
Stefano
Storm, Christian Feb. 16, 2018, 12:07 p.m. UTC | #2
Hi Stefano,

> On 16/02/2018 12:20, Christian Storm wrote:
> > Add missing #include "swupdate_status.h" for
> > sourcetype definition.
> > 
> > Signed-off-by: Christian Storm <christian.storm@siemens.com>
> > ---
> >  include/channel_curl.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/include/channel_curl.h b/include/channel_curl.h
> > index c145d7a..2133744 100644
> > --- a/include/channel_curl.h
> > +++ b/include/channel_curl.h
> > @@ -9,6 +9,7 @@
> >  #include <json-c/json.h>
> >  #include <stdio.h>
> >  #include "sslapi.h"
> > +#include "swupdate_status.h"
> >  
> >  /* Curl Channel Implementation Private Header File.
> >   *
> > 
> 
> Should we not have an error from Travis if an header is missing ? Why do
> we have not ?
> 
> If there is a configuration raising this error, we should add this
> configuration to configs/, too, to be sure that build is not broken in
> future.

Hm, I found this by staring at the screen :)

In commit efd0bdd I added "sourcetype source;" to channel_data_t 
but didn't include swupdate_status.h where it is defined in the same
commit. No compile error was triggered by this though...



Kind regards,
   Christian
Stefano Babic Feb. 16, 2018, 12:14 p.m. UTC | #3
On 16/02/2018 13:07, Christian Storm wrote:
> Hi Stefano,
> 
>> On 16/02/2018 12:20, Christian Storm wrote:
>>> Add missing #include "swupdate_status.h" for
>>> sourcetype definition.
>>>
>>> Signed-off-by: Christian Storm <christian.storm@siemens.com>
>>> ---
>>>  include/channel_curl.h | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/include/channel_curl.h b/include/channel_curl.h
>>> index c145d7a..2133744 100644
>>> --- a/include/channel_curl.h
>>> +++ b/include/channel_curl.h
>>> @@ -9,6 +9,7 @@
>>>  #include <json-c/json.h>
>>>  #include <stdio.h>
>>>  #include "sslapi.h"
>>> +#include "swupdate_status.h"
>>>  
>>>  /* Curl Channel Implementation Private Header File.
>>>   *
>>>
>>
>> Should we not have an error from Travis if an header is missing ? Why do
>> we have not ?
>>
>> If there is a configuration raising this error, we should add this
>> configuration to configs/, too, to be sure that build is not broken in
>> future.
> 
> Hm, I found this by staring at the screen :)
> 
> In commit efd0bdd I added "sourcetype source;" to channel_data_t 
> but didn't include swupdate_status.h where it is defined in the same
> commit. No compile error was triggered by this though...
> 

This is because channel_curl.c and handlers/swuforward_handler.c (the
two users) include util.h and this includes itself swupdate_status.h.

So nothing is broken with the commit :-). Anyway, I can apply this just
to let channel_curl.h to make it independent.

Regards,
Stefano
Storm, Christian Feb. 16, 2018, 12:18 p.m. UTC | #4
Hi Stefano,

> >>> Add missing #include "swupdate_status.h" for
> >>> sourcetype definition.
> >>>
> >>> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> >>> ---
> >>>  include/channel_curl.h | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/include/channel_curl.h b/include/channel_curl.h
> >>> index c145d7a..2133744 100644
> >>> --- a/include/channel_curl.h
> >>> +++ b/include/channel_curl.h
> >>> @@ -9,6 +9,7 @@
> >>>  #include <json-c/json.h>
> >>>  #include <stdio.h>
> >>>  #include "sslapi.h"
> >>> +#include "swupdate_status.h"
> >>>  
> >>>  /* Curl Channel Implementation Private Header File.
> >>>   *
> >>>
> >>
> >> Should we not have an error from Travis if an header is missing ? Why do
> >> we have not ?
> >>
> >> If there is a configuration raising this error, we should add this
> >> configuration to configs/, too, to be sure that build is not broken in
> >> future.
> > 
> > Hm, I found this by staring at the screen :)
> > 
> > In commit efd0bdd I added "sourcetype source;" to channel_data_t 
> > but didn't include swupdate_status.h where it is defined in the same
> > commit. No compile error was triggered by this though...
> > 
> 
> This is because channel_curl.c and handlers/swuforward_handler.c (the
> two users) include util.h and this includes itself swupdate_status.h.
> 
> So nothing is broken with the commit :-). 

That's good, very good indeed :)

> Anyway, I can apply this just to let channel_curl.h to make it
> independent.

Yes, that would be good to have this dependency in there explicitly.


Thanks!


Kind regards,
   Christian
diff mbox series

Patch

diff --git a/include/channel_curl.h b/include/channel_curl.h
index c145d7a..2133744 100644
--- a/include/channel_curl.h
+++ b/include/channel_curl.h
@@ -9,6 +9,7 @@ 
 #include <json-c/json.h>
 #include <stdio.h>
 #include "sslapi.h"
+#include "swupdate_status.h"
 
 /* Curl Channel Implementation Private Header File.
  *