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

Bugfix dtcenter/METplus-Internal#14 main_v10.1 fixed length array #2156

Merged
merged 6 commits into from
May 10, 2022

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented May 10, 2022

Expected Differences

No difference

  • Added literals and use them:
    • concat_string_buf_size
    • ascii_table_buf_size
    • fudge_size
    • tmp_buf_size
    • rad_obstype_len
    • rad_dplat_len
    • rad_isis_len
    • rad_int_len

egrep -r "[[0-9]+]" find ./src -name "*.h" | grep -v grib_classes

./src/basic/vx_util/crc_array.h:T min_v = e[0];   <== not an issue
./src/basic/vx_util/crc_array.h:T max_v = e[0];   <== not an issue
./src/basic/vx_util/command_line.h:      void set(int argc, char ** argv);                  //  includes argv[0]   <== not an issue
./src/basic/vx_util/command_line.h:      void set(const StringArray &);                     //  includes argv[0]   <== not an issue
./src/basic/vx_util/command_line.h:      void set(const StringArray &, UsageFunction);      //  includes argv[0]   <== not an issue
./src/basic/enum_to_string/enum.tab.h:   char name[128];    << yacc related
./src/libcode/vx_nc_obs/met_point_data.h:inline int MetPointData::get_grib_code_or_var_index(const float obs_arr[OBS_ARRAY_LEN]) { return obs_arr[1]; };   <== not an issue
./src/libcode/vx_nc_obs/met_point_data.h:inline int MetPointData::get_header_offset(const float obs_arr[OBS_ARRAY_LEN]) { return obs_arr[0]; };   <== not an issue
./src/libcode/vx_nc_obs/met_point_data.h:inline void MetPointData::set_grib_code_or_var_index(float obs_arr[OBS_ARRAY_LEN], int grib_code) { obs_arr[1] = grib_code; }   <== not an issue
./src/libcode/vx_gis/shp_poly_record.h:   double bbox[4];   //  order: x_min, y_min, x_max, y_max   <== not an issue
./src/libcode/vx_gis/shp_poly_record.h:inline double ShpPolyRecord::x_min() const { return ( bbox[0] ); }   <== not an issue
./src/libcode/vx_gis/shp_poly_record.h:inline double ShpPolyRecord::x_max() const { return ( bbox[2] ); }   <== not an issue
./src/libcode/vx_gis/shp_poly_record.h:inline double ShpPolyRecord::y_min() const { return ( bbox[1] ); }   <== not an issue
./src/libcode/vx_gis/shp_poly_record.h:inline double ShpPolyRecord::y_max() const { return ( bbox[3] ); }   <== not an issue
./src/libcode/vx_color/color_parser_yacc.h:   char text[129];    << yacc related
./src/tools/tc_utils/tc_stat/tc_stat_job.h:      ConcatString DumpFileCTC[4];   <== not an issue
./src/tools/tc_utils/tc_stat/tc_stat_job.h:      ofstream    *DumpOutCTC[4];   <== not an issue
  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

do unit test and make sure no changes

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]

  • Do these changes include sufficient testing updates? [No]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [Fill in date].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Linked issues with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

@hsoh-u hsoh-u added this to the MET 10.1.2 (bugfix) milestone May 10, 2022
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix 14 main v10.1 fixed length array Bugfix dtcenter/METplus-Internal #14 main_v10.1 fixed length array May 10, 2022
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix dtcenter/METplus-Internal #14 main_v10.1 fixed length array Bugfix dtcenter/METplus-Internal#14 main_v10.1 fixed length array May 10, 2022
@@ -239,7 +240,7 @@ class SummaryObs
memset(&time_struct, 0, sizeof(time_struct));

time_struct.tm_year = atoi(time_string.substr(0, 4).c_str()) - 1900;
time_struct.tm_mon = atoi(time_string.substr(4, 2).c_str()) - 1;
time_struct.tm_mon = atoi(time_string.substr(4, 2).c_str()) - 1;
time_struct.tm_mday = atoi(time_string.substr(6, 2).c_str());
time_struct.tm_hour = atoi(time_string.substr(9, 2).c_str());
time_struct.tm_min = atoi(time_string.substr(11, 2).c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you're trying to line these up, add one more space on lines 246 and 247.

Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

I approve of these changes.

I reviewed the changes and don't see any obvious issues. Note that the GitHub Actions testing workflow ran without error and produced no diffs, which is great. I realize that these changes are related to STIG rules.

I did add a comment that it looks like you were trying to line up some equal signs. And you should shift over 2 more lines to get them to all line up.

@hsoh-u hsoh-u merged commit ee4deb7 into main_v10.1 May 10, 2022
@hsoh-u hsoh-u deleted the bugfix_14_main_v10.1_fixed_length_array branch May 13, 2022 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants