Refactor: Allow for better static analysis, fixing some GCC analyzer warnings.

* gettext-tools/src/cldr-plural.y: Define SB_NO_APPENDF.
* gettext-tools/src/its.c: Likewise.
* gettext-tools/src/read-desktop.c: Likewise.
* gettext-tools/src/read-properties.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
This commit is contained in:
Bruno Haible 2025-02-09 22:50:17 +01:00
parent dfb392a9d5
commit 27ebe0a5e7
16 changed files with 24 additions and 7 deletions

View File

@ -24,6 +24,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include "unistr.h"
#include "xalloc.h"
#include "string-buffer.h"

View File

@ -36,6 +36,7 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#define SB_NO_APPENDF
#include <error.h>
#include "mem-hash-map.h"
#include "trim.h"

View File

@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "xalloc.h"
#include "xvasprintf.h"

View File

@ -1,5 +1,5 @@
/* Reading Java .properties files.
Copyright (C) 2003-2024 Free Software Foundation, Inc.
Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "message.h"
#include "read-catalog-abstract.h"

View File

@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -30,6 +30,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -1,5 +1,5 @@
/* xgettext Java backend.
Copyright (C) 2003-2024 Free Software Foundation, Inc.
Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@ -28,6 +28,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -1,5 +1,5 @@
/* xgettext JavaScript backend.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file was written by Andreas Stricker <andy@knitter.ch>, 2010
It's based on x-python from Bruno Haible.
@ -31,6 +31,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -1,5 +1,5 @@
/* xgettext Lua backend.
Copyright (C) 2012-2024 Free Software Foundation, Inc.
Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file was written by Ľubomír Remák <lubomirr@lubomirr.eu>, 2012.
@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -1,5 +1,5 @@
/* xgettext Python backend.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
@ -30,6 +30,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -29,6 +29,7 @@
#include <stddef.h>
#include <stdlib.h>
#define SB_NO_APPENDF
#include <error.h>
#include "c-ctype.h"
#include "po-charset.h"

View File

@ -1,5 +1,5 @@
/* xgettext Smalltalk backend.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -1,5 +1,5 @@
/* xgettext Vala backend.
Copyright (C) 2013-2024 Free Software Foundation, Inc.
Copyright (C) 2013-2025 Free Software Foundation, Inc.
This file was written by Daiki Ueno <ueno@gnu.org>, 2013.
@ -30,6 +30,7 @@
#include <stdlib.h>
#include <string.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#define SB_NO_APPENDF
#include <error.h>
#include "attribute.h"
#include "message.h"