Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-alt r1644 - in trunk/toolchain-prefix-wrapper: ld utils
Date: Sat, 21 Mar 2009 14:28:51
Message-Id: E1Ll2Br-0002vs-P8@stork.gentoo.org
1 Author: grobian
2 Date: 2009-03-21 14:28:47 +0000 (Sat, 21 Mar 2009)
3 New Revision: 1644
4
5 Modified:
6 trunk/toolchain-prefix-wrapper/ld/gnuplugin.c
7 trunk/toolchain-prefix-wrapper/ld/ldwrapper.c
8 trunk/toolchain-prefix-wrapper/utils/textfile.c
9 Log:
10 squash compiler warnings (unused variables, unused computed values)
11
12 Modified: trunk/toolchain-prefix-wrapper/ld/gnuplugin.c
13 ===================================================================
14 --- trunk/toolchain-prefix-wrapper/ld/gnuplugin.c 2009-03-21 14:09:47 UTC (rev 1643)
15 +++ trunk/toolchain-prefix-wrapper/ld/gnuplugin.c 2009-03-21 14:28:47 UTC (rev 1644)
16 @@ -91,7 +91,7 @@
17 if (curr == argBuffer && rpathArg == _R) {
18 struct stat sbuf;
19 int rv;
20 - char *path = curr;
21 + char *path = (char *)curr;
22 if (*next == ':') {
23 /* terminate the string in case of ':' */
24 path = alloca(sizeof(char) * (next - curr + 1));
25
26 Modified: trunk/toolchain-prefix-wrapper/ld/ldwrapper.c
27 ===================================================================
28 --- trunk/toolchain-prefix-wrapper/ld/ldwrapper.c 2009-03-21 14:09:47 UTC (rev 1643)
29 +++ trunk/toolchain-prefix-wrapper/ld/ldwrapper.c 2009-03-21 14:28:47 UTC (rev 1644)
30 @@ -39,7 +39,7 @@
31 #define BINUTILS_CONFIG GENTOO_PORTAGE_EPREFIX "/usr/bin/binutils-config" /* host */
32 #define ENVD_BASE_BINUTILS GENTOO_PORTAGE_EPREFIX "/etc/env.d/binutils/" /* host */
33
34 -#define dprintf DEBUG() && fprintf
35 +#define dprintf if (DEBUG()) fprintf
36
37 typedef struct _LdWrapperData {
38 String* name; /* basename(argv[0]), mainly for diagnostics */
39 @@ -70,7 +70,6 @@
40 {
41 if (data->_ctarget_binutilsbin_ == NULL) {
42 /* cache the string "/${CTARGET}/binutils-bin/" */
43 - char const binutilsbin[] = "/binutils-bin/";
44 data->_ctarget_binutilsbin_ = StringCreateConcat("/", 1
45 , StringGetBuffer(data->pluginIn.target.triplet)
46 , StringGetLength(data->pluginIn.target.triplet)
47 @@ -144,8 +143,6 @@
48 static int find_binutils_in_path(LdWrapperData *data)
49 {
50 int i, pathcount;
51 - char *token = NULL, *state;
52 - char str[MAXPATHLEN + 1];
53
54 if (data->envpath == NULL) return 0;
55
56 @@ -176,7 +173,6 @@
57 static String* parseline_shellvariable(LdWrapperData* data,
58 char const *variable, int varlen, char const *line, int linelen)
59 {
60 - int i;
61 String* rv;
62
63 if (linelen < 0) linelen = strlen(line);
64 @@ -235,9 +231,7 @@
65 String const * thisline;
66 String* currentBVER = NULL;
67 String* bindir = NULL;
68 - int lineno = 0;
69 int rv = 0;
70 - char *strp;
71
72 envfile = TextfileOpenConcatName(ENVD_BASE_BINUTILS, strlen(ENVD_BASE_BINUTILS),
73 "config-", strlen("config-"),
74 @@ -812,7 +806,6 @@
75 {
76 String *tmpString = NULL;
77 LdWrapperData data;
78 - size_t size;
79 int len;
80 char **newargv = argv;
81 char const *found;
82
83 Modified: trunk/toolchain-prefix-wrapper/utils/textfile.c
84 ===================================================================
85 --- trunk/toolchain-prefix-wrapper/utils/textfile.c 2009-03-21 14:09:47 UTC (rev 1643)
86 +++ trunk/toolchain-prefix-wrapper/utils/textfile.c 2009-03-21 14:28:47 UTC (rev 1644)
87 @@ -157,10 +157,7 @@
88 */
89 int TextfileReadLines(Textfile* textfile)
90 {
91 - String* thisline = NULL;
92 int rv = 0;
93 - int linelen;
94 - int appendrv;
95 fpos_t save_fpos;
96 int save_errno;
97 String* save_currentline = NULL;