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

Resolve PB2NC string truncation warning messages. #1909

Closed
8 of 21 tasks
JohnHalleyGotway opened this issue Sep 3, 2021 · 2 comments · Fixed by #1911
Closed
8 of 21 tasks

Resolve PB2NC string truncation warning messages. #1909

JohnHalleyGotway opened this issue Sep 3, 2021 · 2 comments · Fixed by #1911
Assignees
Labels
component: code cleanup Code cleanup and maintenance issue priority: blocker Blocker reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA BASE NOAA Office of Atmospheric Research DTC Project requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: task An actionable item of work
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

Describe the Task

Pull requests for Issue #1855 introduced several hundred warning messages when running PB2NC. These are evident when running:

make test >& make_test.log

Here's the resulting make.log file.
It contains 986 new warning messages:

grep WARNING make_test.log | grep get_variable_info | wc -l
     986

And here's what one looks like:

WARNING:   get_variable_info() truncated a string var_name from "SAID     | 001007 | SATELLITE IDENTIFIER (SATELLITE REPORTS ONLY)            |
WARNING: " to "SAID    "

This task is investigate this situation and get rid of that warning. I suspect that the vertical bar '|' should be interpreted as a field separator. Could you use strtok or string split instead so that this doesn't trigger a warning message?

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

Please fix in the next development cycle, met-10.1.0-beta3.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: Howard
  • Select scientist(s) or no scientist required: none required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added component: code cleanup Code cleanup and maintenance issue type: task An actionable item of work priority: blocker Blocker alert: NEED ACCOUNT KEY Need to assign an account key to this issue requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project labels Sep 3, 2021
@JohnHalleyGotway JohnHalleyGotway added this to the MET 10.1.0 milestone Sep 3, 2021
@hsoh-u
Copy link
Collaborator

hsoh-u commented Sep 9, 2021

This was introduced by checking the result of stpcpy APIs: give warnings if the string is truncated. strnpy does truncate if the target string buffer is smaller than the source string buffer. The checking should be skipped in this case. This will be implemented at m_strXXX API with #1903

@hsoh-u hsoh-u linked a pull request Sep 14, 2021 that will close this issue
12 tasks
@hsoh-u
Copy link
Collaborator

hsoh-u commented Sep 14, 2021

Fixed with #1903

@hsoh-u hsoh-u closed this as completed Sep 14, 2021
@TaraJensen TaraJensen added reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA BASE NOAA Office of Atmospheric Research DTC Project labels Oct 1, 2021
@JohnHalleyGotway JohnHalleyGotway linked a pull request Oct 29, 2021 that will close this issue
12 tasks
@JohnHalleyGotway JohnHalleyGotway removed a link to a pull request Oct 29, 2021
12 tasks
@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED ACCOUNT KEY Need to assign an account key to this issue label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: code cleanup Code cleanup and maintenance issue priority: blocker Blocker reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA BASE NOAA Office of Atmospheric Research DTC Project requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: task An actionable item of work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants