Compilation warnings in 1.3.1

Bug #1325297 reported by Simon Ratcliffe on 2014-06-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mosquitto
New
Undecided
Unassigned

Bug Description

When compiling 1.3.1 under Ubuntu I get 2 compilation warnings.

mosquitto.c:194:2: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]

mosquitto.c should have #include <sys/time.h>

logging.c:107:2: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]

logging.c should have #include <time.h>

Cheers
Simon

Hi there,

I don't see those warnings on Ubuntu (otherwise I would have fixed
them!), could you give more details of your system?

Cheers,

Roger

On Sun, Jun 1, 2014 at 1:03 AM, Simon Ratcliffe <email address hidden> wrote:
> Public bug reported:
>
> When compiling 1.3.1 under Ubuntu I get 2 compilation warnings.
>
> mosquitto.c:194:2: warning: implicit declaration of function
> 'gettimeofday' [-Wimplicit-function-declaration]
>
> mosquitto.c should have #include <sys/time.h>
>
>
> logging.c:107:2: warning: implicit declaration of function 'time'
> [-Wimplicit-function-declaration]
>
> logging.c should have #include <time.h>
>
> Cheers
> Simon
>
> ** Affects: mosquitto
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> mosquitto.
> https://bugs.launchpad.net/bugs/1325297
>
> Title:
> Compilation warnings in 1.3.1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mosquitto/+bug/1325297/+subscriptions

Simon Ratcliffe (simon-k) wrote :

Hi Roger,

I just did a build on a fresh install of Ubuntu 14.04 and all worked until I turned off TLS (ie. I commented out WITH_TLS:=yes in config.mk), then the warnings appear.

Cheers
Simon

----- Original Message -----

From: "Roger Light" <email address hidden>
To: <email address hidden>
Sent: Monday, 2 June, 2014 5:27:09 AM
Subject: Re: [Bug 1325297] [NEW] Compilation warnings in 1.3.1

Hi there,

I don't see those warnings on Ubuntu (otherwise I would have fixed
them!), could you give more details of your system?

Cheers,

Roger

On Sun, Jun 1, 2014 at 1:03 AM, Simon Ratcliffe <email address hidden> wrote:
> Public bug reported:
>
> When compiling 1.3.1 under Ubuntu I get 2 compilation warnings.
>
> mosquitto.c:194:2: warning: implicit declaration of function
> 'gettimeofday' [-Wimplicit-function-declaration]
>
> mosquitto.c should have #include <sys/time.h>
>
>
> logging.c:107:2: warning: implicit declaration of function 'time'
> [-Wimplicit-function-declaration]
>
> logging.c should have #include <time.h>
>
> Cheers
> Simon
>
> ** Affects: mosquitto
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> mosquitto.
> https://bugs.launchpad.net/bugs/1325297
>
> Title:
> Compilation warnings in 1.3.1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mosquitto/+bug/1325297/+subscriptions

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1325297

Title:
Compilation warnings in 1.3.1

Status in mosquitto: an mqtt message broker:
New

Bug description:
When compiling 1.3.1 under Ubuntu I get 2 compilation warnings.

mosquitto.c:194:2: warning: implicit declaration of function
'gettimeofday' [-Wimplicit-function-declaration]

mosquitto.c should have #include <sys/time.h>

logging.c:107:2: warning: implicit declaration of function 'time'
[-Wimplicit-function-declaration]

logging.c should have #include <time.h>

Cheers
Simon

To manage notifications about this bug go to:
https://bugs.launchpad.net/mosquitto/+bug/1325297/+subscriptions

Roger Light (roger.light) wrote :

Ah, gotcha. Thanks, that is now fixed.

FWIW, it's easier to just do

make WITH_TLS=no

than edit config.mk.

Changed in mosquitto:
milestone: none → 1.4
status: New → Fix Committed
Changed in mosquitto:
milestone: 1.4 → 1.3.2
status: Fix Committed → Fix Released
Simon Ratcliffe (simon-k) wrote :

Hi Roger,

I just downloaded and compiled 1.3.4 and these warnings are still appearing.

Changed in mosquitto:
status: Fix Released → New
information type: Public → Private Security
information type: Private Security → Public
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers