[pacman-dev] [PATCH 5/6] base64.c: comment out unused variable

Emil Lundberg lundberg.emil at gmail.com
Tue Jan 14 03:16:20 EST 2014


Now, I'm not a dev, but this piqued my curiosity. Since this code is
under version control, why comment it out instead of just deleting it?

On Tue, Jan 14, 2014 at 1:01 PM, Andrew Gregory
<andrew.gregory.8 at gmail.com> wrote:
> Commit e47eb9a7 commented out base64_encode, which left base64_enc_map
> unused, causing warnings under clang.
>
> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> ---
>  lib/libalpm/base64.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/libalpm/base64.c b/lib/libalpm/base64.c
> index 32c4445..31ecca1 100644
> --- a/lib/libalpm/base64.c
> +++ b/lib/libalpm/base64.c
> @@ -36,6 +36,7 @@
>
>  #include "base64.h"
>
> +#if 0
>  static const unsigned char base64_enc_map[64] =
>  {
>      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
> @@ -46,6 +47,7 @@ static const unsigned char base64_enc_map[64] =
>      'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7',
>      '8', '9', '+', '/'
>  };
> +#endif
>
>  static const unsigned char base64_dec_map[128] =
>  {
> --
> 1.8.5.2
>
>


More information about the pacman-dev mailing list