Add pg_nodiscard decorations to base64 functions

Peter Eisentraut <peter@eisentraut.org>

Commit: b0eff1098860f88dd385e6882ff7b1063d267213
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2025-01-17T07:21:32Z
Releases: 18.0
Add pg_nodiscard decorations to base64 functions

The result of pg_b64_encode() and pg_b64_decode() should be checked
for errors.  This attribute could detect mistakes such as those fixed
in commit ff030ebe250 and d278541be42.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAEudQAq-3yHsSdWoOOaw%2BgAQYgPMpMGuB5pt2yCXgv-YuxG2Hg%40mail.gmail.com

Files

PathChange+/−
src/include/common/base64.h modified +2 −2

Discussion