[ 
https://issues.apache.org/jira/browse/LUCY-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275017#comment-15275017
 ] 

ASF GitHub Bot commented on LUCY-295:
-------------------------------------

GitHub user rectang opened a pull request:

    https://github.com/apache/lucy/pull/48

    LUCY-295 Misc -Wconversion, part 1

    Attend to miscellaneous integer conversion warnings.
    
    * Doc IDs.
    * Timeouts.
    * Sort ordinals.
    * "Tick" array indexes.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rectang/lucy LUCY-295-misc1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucy/pull/48.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #48
    
----
commit f37309a2f03194b2a40108f1cdb032168b3bff22
Author: Marvin Humphrey <[email protected]>
Date:   2016-05-05T02:38:17Z

    Adapt doc ID int types to placate -Wconversion.

commit 679ced9ce848c8d6bfaeecd710d143c6cb398ff0
Author: Marvin Humphrey <[email protected]>
Date:   2016-05-06T01:56:16Z

    Adapt "tick" variables for -Wconversion.
    
    Array indexes, segment numbers, etc.

commit f391174cd33ba98e989ada7bc61e93c5c0576cc6
Author: Marvin Humphrey <[email protected]>
Date:   2016-05-06T02:14:08Z

    Limit range of lock timeouts/intervals.

commit 304d5cfd36983eeb7d1d4ccb54154fd1039b5043
Author: Marvin Humphrey <[email protected]>
Date:   2016-05-07T00:56:04Z

    Placate -Wconversion for sort ordinals.
    
    Add some casts, but generally hold off on redundant checks.  (Aside from
    one doc_id < 0 check.)  The primary safety mechanism is that
    implementations of SortCache_Value, which take an ord, perform safe
    InStream reads and will throw errors properly upon being handed
    out-of-range ords.

commit 166c26eadd76c3d8f5cc8f77ddc8a518e45164e1
Author: Marvin Humphrey <[email protected]>
Date:   2016-05-07T01:56:28Z

    Address ord int conv warnings in SortCollector.
    
    Prefer unsigned integers to clarify bounds checking of lookups in ord
    arrays.

----


> Address integer conversion compiler warnings
> --------------------------------------------
>
>                 Key: LUCY-295
>                 URL: https://issues.apache.org/jira/browse/LUCY-295
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Minor
>             Fix For: 0.6.0
>
>
> Enabling `-Wconversion` reveals a fairly large number of warnings.  Most are 
> harmless and just require an inconsequential type change or a cast.  Some are 
> best fixed with API changes. There may be some bugs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to