Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a missing break in test/shlibloadtest.c #3661

Conversation

bernd-edlinger
Copy link
Member

This fixes a gcc warning about missing break (or fallthru comment).

@@ -117,6 +117,7 @@ static int test_lib(void)
if (!TEST_true(shlib_load(path_crypto, &cryptolib))
|| !TEST_true(shlib_load(path_ssl, &ssllib)))
goto end;
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a similar instance below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ay, looks like gcc did not catch it because it was in false-conditional context.

@@ -117,6 +117,7 @@ static int test_lib(void)
if (!TEST_true(shlib_load(path_crypto, &cryptolib))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may like to bump up the copyright year at the 2nd line of this file into '2017'

@@ -117,6 +117,7 @@ static int test_lib(void)
if (!TEST_true(shlib_load(path_crypto, &cryptolib))
|| !TEST_true(shlib_load(path_ssl, &ssllib)))
goto end;
break;
case SSL_FIRST:
if (!TEST_true(shlib_load(path_ssl, &ssllib))
|| !TEST_true(shlib_load(path_crypto, &cryptolib)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if the || !TEST thing should be aligned to the ! above. But it seems doing so will help make the code at a low risk to exceed 80 boundary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is valid style

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(have we actually agreed on that, @mattcaswell?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well let's say it's everywhere and used frequently and never been challenged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been question on the omc list a while ago, and I can't recall that we came to a conclusion, just that some of us like it and others don't. Ah well, we've let it go so far.

Now, to get that style into our source formatting script ;-)

@@ -1,5 +1,5 @@
/*
* Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

I checked the Copyright headers in that directory and I wanted to ask if that one is correct:
x509_dup_cert_test.c: * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would prefer just to have the OpenSSL author copyright, but it's not a requirement. The terms in the CLA let us do our redistribution terms. Ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That copyright line from Oracle is confusing, and I think we should try to avoid it. It claims something in that file is copyright by Oracle and that we don't have a license for it.

In any case, you should not update copyright years that don't belong to you or the OpenSSL project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely, two copyright lines means dual copyright, no? As far as I know, that's valid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where dual copyright means that there are 2 people having a copyright and both need to provide a license. Which is different from a dual license where 1 copyright holder makes it available under 2 licenses.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take this to the team mailing list.

@richsalz richsalz self-assigned this Jun 13, 2017
@richsalz
Copy link
Contributor

commit 5511101 on master.

@richsalz richsalz closed this Jun 16, 2017
levitte pushed a commit that referenced this pull request Jun 16, 2017
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #3661)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants