zhan7236 opened a new pull request, #1456:
URL: https://github.com/apache/cloudberry/pull/1456

   Fixes #1206
   
   ### What does this PR do?
   This PR fixes a `gawk` warning that appears during `make install`:
   
   ```
   gawk: cmd. line:1: warning: regexp escape sequence `#' is not a known regexp 
operator
   ```
   
   The `#` character does not need to be escaped in regular expressions. The 
code previously used `[^\#]` to match lines not starting with `#`, but `\#` is 
not a valid escape sequence. While it works functionally (most regex engines 
ignore invalid escapes), `gawk` emits a warning.
   
   **Changes made:**
   - **Makefile**: Replaced `[^\#]` with `[^#]` in 2 places (darwin and linux 
platform symbol mapping rules).
   - **Makefile.shlib**: Replaced `[^\#]` with `[^#]` in 5 places (darwin, 
openbsd, freebsd, netbsd, linux BUILD.exports).
   
   ### Type of Change
   - [x] Bug fix (non-breaking change)
   - [ ] New feature (non-breaking change)
   - [ ] Breaking change (fix or feature with breaking changes)
   - [ ] Documentation update
   
   ### Test Plan
   - [ ] Unit tests added/updated
   - [ ] Integration tests added/updated
   - [x] Passed `make installcheck`
   - [x] Passed `make -C src/test installcheck-cbdb-parallel`
   
   **Manual Verification:**
   Verified the regex still works correctly via command line:
   ```bash
   echo -e "# comment\nfunction1 123" | gawk '/^[^#]/ {printf "%s;\n",$1}'
   # Output: function1;
   ```
   Confirmed that `make install` no longer emits the gawk warning.
   
   ### Impact
   **Performance:**
   No performance impact - this is a cosmetic fix to eliminate build warnings.
   
   **User-facing changes:**
   No functional user-facing changes. Build output will no longer show the gawk 
warning.
   
   **Dependencies:**
   None.
   
   ### Checklist
   - [x] Followed [contribution 
guide](https://cloudberry.apache.org/contribute/code)
   - [ ] Added/updated documentation
   - [x] Reviewed code for security implications
   - [x] Requested review from [cloudberry 
committers](https://github.com/orgs/apache/teams/cloudberry-committers)
   
   ### Additional Context
   This is a simple fix that removes unnecessary escape characters from regex 
patterns in Makefiles. The functionality remains exactly the same - `[^#]` and 
`[^\#]` both match any character that is not `#`.
   
   ### CI Skip Instructions
   ---


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to