public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2023-09-28 17:52 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a6178dcd6d1a6f60719615a7c99f6aaf236e71b
commit 0a6178dcd6d1a6f60719615a7c99f6aaf236e71b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index cde5b4d74c..45fa3a3e7f 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2024-04-17 20:07 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:07 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=774dfa5a5a2631a690ddeda24f652fa849fcbc57
commit 774dfa5a5a2631a690ddeda24f652fa849fcbc57
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index 106b64f486..8c8eaddb51 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2024-04-02 15:53 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:53 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b69b668f99ca223ff9918d51f056d78a1d526241
commit b69b668f99ca223ff9918d51f056d78a1d526241
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index 106b64f486..8c8eaddb51 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2024-02-09 17:31 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:31 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b46993d84d2bb04fe7098d6299193b797b05ec49
commit b46993d84d2bb04fe7098d6299193b797b05ec49
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index 106b64f486..8c8eaddb51 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2024-02-07 14:07 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:07 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=97fa106e90fdf226bbb9fc7bc8823e17146eed06
commit 97fa106e90fdf226bbb9fc7bc8823e17146eed06
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index 106b64f486..8c8eaddb51 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2024-01-29 17:57 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:57 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=95ea3d2f8e93648160ed892bf9181a64456b374d
commit 95ea3d2f8e93648160ed892bf9181a64456b374d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index 106b64f486..8c8eaddb51 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2023-12-21 18:53 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:53 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ccb36999ec1e9b356c67d0ad069a983ded138b1
commit 5ccb36999ec1e9b356c67d0ad069a983ded138b1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index cde5b4d74c..45fa3a3e7f 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
* [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec
@ 2023-08-30 12:42 Adhemerval Zanella
0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:42 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=47581f57f7ae321534ec4f510d7ba788b2fd9354
commit 47581f57f7ae321534ec4f510d7ba788b2fd9354
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Mar 20 16:20:48 2023 -0300
support: Handle clang support/dtotimespec.c on dtotimespec
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
Diff:
---
support/dtotimespec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/dtotimespec.c b/support/dtotimespec.c
index cde5b4d74c..45fa3a3e7f 100644
--- a/support/dtotimespec.c
+++ b/support/dtotimespec.c
@@ -28,7 +28,7 @@ dtotimespec (double sec)
{
if (sec <= TYPE_MINIMUM (time_t))
return make_timespec (TYPE_MINIMUM (time_t), 0);
- else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
+ else if (sec >= 1.0 + (double) TYPE_MAXIMUM (time_t))
return make_timespec (TYPE_MAXIMUM (time_t), TIMESPEC_HZ - 1);
else
{
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-17 20:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-28 17:52 [glibc/azanella/clang] support: Handle clang support/dtotimespec.c on dtotimespec Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:07 Adhemerval Zanella
2024-04-02 15:53 Adhemerval Zanella
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:07 Adhemerval Zanella
2024-01-29 17:57 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-08-30 12:42 Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).