ApsaraDB / PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/
Apache License 2.0
2.89k stars 481 forks source link

fix: clean up code to eliminate compilation warnings #524

Closed Howard229 closed 2 months ago

Howard229 commented 2 months ago
  1. Assign an initial value of 0 to the 'nSockets_base' variable to prevent the compilation warning 'may be used uninitialized in this function'.
  2. Delete the 'blockNum' variable, which is defined but not used in the 'polar_bulk_read_buffer_common' function.
  3. Delete the unused function definition 'px_show_scan_unit_size' from the 'guc_px.c' file. The implementation of this function has been removed in the d52e8258 commit.

image

polardb-bot[bot] commented 2 months ago

Hi @Howard229 ~ Thanks for your contribution in this PR. ❤️

Please make sure that your PR conforms the standard, and has passed all the checks.

We will review your PR as soon as possible.

polardb-bot[bot] commented 2 months ago

Hey @Howard229 :

Something wrong occuried during the checks of your commit 😟, please check the detail:

⚠️ build_normal (ubuntu20.04, htap) View more details
⚠️ build_normal (ubuntu20.04, htap) View more details
polardb-bot[bot] commented 2 months ago

Hey @Howard229 :

Congratulations~ 🎉 Your commit has passed all the checks. Please wait for further manual review.

Howard229 commented 2 months ago

1、为nSockets_base变量赋初始值0,防止编译告警‘may be used uninitialized in this function’; 2、删除polar_bulk_read_buffer_common函数中定义但未使用的blockNum变量; 3、删除guc_px.c文件中多余的函数定义px_show_scan_unit_size,该函数的实现在d52e8258f4cfd4b6fc50d36d7149e9131a6581f3提交中已经被删除。

Howard229 commented 2 months ago

Hey @mrdrivingduck , could you help me review&merge it

mrdrivingduck commented 2 months ago

@Howard229 better to edit your commit title and commit message to explain what you have changed. The code itself LGTM.

Howard229 commented 2 months ago

@Howard229 better to edit your commit title and commit message to explain what you have changed. The code itself LGTM.

Okay, I'll make some modifications

polardb-bot[bot] commented 2 months ago

Hey @Howard229 :

Congratulations~ 🎉 Your commit has passed all the checks. Please wait for further manual review.

Howard229 commented 2 months ago

@Howard229 better to edit your commit title and commit message to explain what you have changed. The code itself LGTM.

Hey @mrdrivingduck , I have updated the commit title and commit message. Could you please review them again?

mrdrivingduck commented 2 months ago

/rebase-and-merge

polardb-bot[bot] commented 2 months ago

@mrdrivingduck PR has been merged. 🍗

Thanks again for the contributors involved in this thread: ❤️