Changeset 920 for current/host/trunk/empath/trunk
- Timestamp:
- 04/03/07 09:47:33 (22 months ago)
- Location:
- current/host/trunk/empath/trunk
- Files:
-
- 3 modified
-
README (modified) (1 diff)
-
configure.ac (modified) (3 diffs)
-
src/aptcache.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
current/host/trunk/empath/trunk/README
r670 r920 8 8 The previous hack is no longer needed, just run: 9 9 ./autogen.sh 10 ./configure 10 ./configure --enable-compile-warnings --enable-error-on-warning 11 11 make 12 svn-buildpackage 12 svn-buildpackage -uc -us -rfakeroot 13 13 14 14 Don't forget to update the manpage: -
current/host/trunk/empath/trunk/configure.ac
r669 r920 69 69 dnl ************************************* 70 70 AC_MSG_CHECKING(what extra warning flags to pass to the C compiler) 71 warnFLAGS= 72 set_compile_warnings=no 73 AC_ARG_ENABLE(compile-warnings, 74 [ --enable-compile-warnings 75 Enable verbose compiler warnings], 76 set_compile_warnings=yes) 77 78 if test "$set_compile_warnings" != "no"; then 79 warnFLAGS="${warnFLAGS} -Wcast-align -Winline -Wsign-compare -Wpointer-arith" 80 fi 71 81 if test ${GCC}x = yesx; then 72 warnFLAGS= 73 CFLAGS="${CFLAGS} -g2 -Wall" 82 CXXFLAGS="${CXXFLAGS} -g2 -Wall" 74 83 AC_ARG_ENABLE(error-on-warning, 75 84 [ --disable-error-on-warning disable treating compile warnings as errors], … … 80 89 esac], 81 90 [ warnFLAGS="${warnFLAGS} -Werror" ]) 82 GCC_VERSION=`${CC} -dumpversion` 83 if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then 84 # This is gcc >= 3.x.x 85 if test `echo ${GCC_VERSION} | cut -d. -f2` -ge 4; then 86 # This is gcc >= 3.4.x 87 warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement" 88 else if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 4; then 89 # This is gcc == 4.x.x 90 warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign" 91 LDFLAGS="${LDFLAGS} -Wl,--as-needed" 92 fi 93 fi 94 else if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 4; then 95 # This is gcc == 4.x.x 96 warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign" 97 fi 98 fi 91 CXXFLAGS="$CXXFLAGS ${warnFLAGS}" 99 92 CFLAGS="${CFLAGS} ${warnFLAGS}" 100 93 else … … 102 95 fi 103 96 AC_MSG_RESULT($warnFLAGS) 104 105 set_compile_warnings=no106 107 AC_ARG_ENABLE(compile-warnings,108 [ --enable-compile-warnings109 Enable verbose compiler warnings],110 set_compile_warnings=yes)111 112 if test "$GCC" = "yes" -a "$set_compile_warnings" != "no"; then113 CFLAGS="$CFLAGS -Wcast-align -Wbad-function-cast \114 -Wstrict-prototypes -Wmissing-declarations -Winline -Wsign-compare \115 -Wmissing-prototypes -Wnested-externs -Wpointer-arith"116 fi117 97 118 98 case "$host" in -
current/host/trunk/empath/trunk/src/aptcache.cc
r919 r920 65 65 static GHashTable * srctree = NULL; 66 66 static gint c = 0; 67 static GList * ignore = NULL;68 67 static GList * sorted_list = NULL; 69 68 static GHashTable * level_hash = NULL; … … 131 130 sorted_list = g_list_sort (sorted_list, list_compare); 132 131 fprintf (stdout, "%s\n", _("The following packages are ignored:")); 133 for (;sorted_list != NULL;sorted_list->next) 134 { 135 fprintf (stdout, "%s\n", sorted_list->data); 136 sorted_list = sorted_list->next; 132 for (GList * b = sorted_list; b != NULL; b = b->next) 133 { 134 fprintf (stdout, "%s\n", (gchar*)b->data); 137 135 } 138 136 } … … 141 139 output_zero (gpointer key) 142 140 { 143 fprintf (stdout, "%s '%s'", _("Package"), key);141 fprintf (stdout, "%s '%s'", _("Package"), (gchar*)key); 144 142 fprintf (stdout, "%s\n", 145 143 _(" can be cross-built from the current base set.")); … … 234 232 if (Fetcher.Run() == pkgAcquire::Failed) 235 233 return FALSE; 234 return TRUE; 236 235 } 237 236 … … 240 239 { 241 240 gchar * URI, * Dist, *Section; 242 gboolean IsSrc;243 241 gchar ** components; 244 242 … … 273 271 apt_init (const gchar * arch, gboolean debug_on) 274 272 { 275 gchar * pkg, *home; 276 guint ScreenWidth = 80 - 1; /* - 1 for the cursor */ 273 gchar *home; 277 274 MMap *Map = 0; 278 gboolean All = _config->FindB("APT::Cache::AllNames","false");275 // gboolean All = _config->FindB("APT::Cache::AllNames","false"); 279 276 280 277 /** \todo run update_cache if a marker is older than 24hrs? */ … … 361 358 { 362 359 g_return_if_fail (package); 363 fprintf (stdout, _("Reading dependencies"), " .");360 fprintf (stdout, "%s %s", _("Reading dependencies"), " ."); 364 361 fflush (stdout); 365 362 check_depends (package, debug_on); … … 393 390 { 394 391 EmDepend * iter = NULL; 395 GList * check = NULL;396 392 397 393 if (aptcache_lookup(pkgname))
