]> git.openstreetmap.org Git - nominatim.git/log
nominatim.git
8 years agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Tue, 4 Oct 2016 18:34:34 +0000 (20:34 +0200)]
Merge remote-tracking branch 'upstream/master'

8 years agocheck for correct array for country codes
Sarah Hoffmann [Tue, 4 Oct 2016 18:32:22 +0000 (20:32 +0200)]
check for correct array for country codes

fixes trac ticket 5427

8 years agoChange on get_addressdata check for matching the condition in placex_update
Rémi BOURGAREL [Tue, 4 Oct 2016 13:49:31 +0000 (15:49 +0200)]
Change on get_addressdata check for matching the condition in placex_update

On placex_update we stop the indexing to the first parent if the rank_search is above 27. We should do the same check in get_adressdata, because place with a rank_address != 30 and a search_rank > 27 will have only 1 parent.
https://github.com/twain47/Nominatim/issues/534

8 years agodocs: fix link
Sarah Hoffmann [Sun, 2 Oct 2016 15:33:49 +0000 (17:33 +0200)]
docs: fix link

8 years agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Sun, 2 Oct 2016 12:23:11 +0000 (14:23 +0200)]
Merge remote-tracking branch 'upstream/master'

8 years agofill interpolation array for reverse lookups via search endpoint
Sarah Hoffmann [Sat, 1 Oct 2016 11:03:31 +0000 (13:03 +0200)]
fill interpolation array for reverse lookups via search endpoint

Fixes #540

8 years agoMerge remote-tracking branch 'upstream/master'
Sarah Hoffmann [Fri, 30 Sep 2016 20:44:37 +0000 (22:44 +0200)]
Merge remote-tracking branch 'upstream/master'

8 years agofix merge error
Sarah Hoffmann [Fri, 30 Sep 2016 19:53:30 +0000 (21:53 +0200)]
fix merge error

8 years agofix namespace use
Sarah Hoffmann [Fri, 30 Sep 2016 20:42:12 +0000 (22:42 +0200)]
fix namespace use

8 years agoMerge remote-tracking branch 'upstream/master' into cmake-port
Sarah Hoffmann [Fri, 30 Sep 2016 19:51:00 +0000 (21:51 +0200)]
Merge remote-tracking branch 'upstream/master' into cmake-port

8 years agotake throttled ip stats from build dir
Sarah Hoffmann [Fri, 30 Sep 2016 18:37:19 +0000 (20:37 +0200)]
take throttled ip stats from build dir

8 years agoMerge pull request #538 from lonvia/update-default-languages
Sarah Hoffmann [Fri, 30 Sep 2016 18:01:20 +0000 (20:01 +0200)]
Merge pull request #538 from lonvia/update-default-languages

Update default languages and move country search term creation to setup.php

8 years agomove country search term creation into setup script
Sarah Hoffmann [Wed, 28 Sep 2016 21:30:44 +0000 (23:30 +0200)]
move country search term creation into setup script

Search results can become odd without the country search
terms, so make their inclusion a mandatory part of the
setup.

Also adds a new configuration variable to restrict the
languages taken into account by Nominatim.

8 years agoupdate per-country language defaults
Sarah Hoffmann [Wed, 28 Sep 2016 20:04:29 +0000 (22:04 +0200)]
update per-country language defaults

Added missing defaults for all mono-lingual countries as per
http://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes

8 years agoMerge pull request #533 from mtmail/PSR2-php-tests
Sarah Hoffmann [Fri, 16 Sep 2016 19:57:38 +0000 (21:57 +0200)]
Merge pull request #533 from mtmail/PSR2-php-tests

fix PSR2 warnings in php tests

8 years agoMerge pull request #532 from mtmail/PSR2-namespaces
Sarah Hoffmann [Fri, 16 Sep 2016 19:55:44 +0000 (21:55 +0200)]
Merge pull request #532 from mtmail/PSR2-namespaces

add namespaces, method visibility according to PSR2 standard

8 years agofix PSR2 warnings in php tests
Marc Tobias Metten [Fri, 16 Sep 2016 00:45:42 +0000 (02:45 +0200)]
fix PSR2 warnings in php tests

8 years agoadd namespaces, method visibility according to PSR2 standard
Marc Tobias Metten [Fri, 16 Sep 2016 00:27:36 +0000 (02:27 +0200)]
add namespaces, method visibility according to PSR2 standard

8 years agovagrant: use old configs when updating
Sarah Hoffmann [Thu, 15 Sep 2016 21:08:54 +0000 (23:08 +0200)]
vagrant: use old configs when updating

Otherwise we may overwrite vagrant-specific settings like
nopassword for sudo.

8 years agoMerge branch 'PSR2-fixes-for-settings' of https://github.com/mtmail/Nominatim into...
Sarah Hoffmann [Thu, 15 Sep 2016 19:53:12 +0000 (21:53 +0200)]
Merge branch 'PSR2-fixes-for-settings' of https://github.com/mtmail/Nominatim into mtmail-misc-psr-fixes

8 years agoMerge branch 'PSR2-fixes-for-wikidata' of https://github.com/mtmail/Nominatim into...
Sarah Hoffmann [Thu, 15 Sep 2016 19:51:48 +0000 (21:51 +0200)]
Merge branch 'PSR2-fixes-for-wikidata' of https://github.com/mtmail/Nominatim into mtmail-misc-psr-fixes

8 years agohalf-reverting 51155b63, We dont need two of three break statements after all
Marc Tobias Metten [Thu, 15 Sep 2016 17:36:32 +0000 (19:36 +0200)]
half-reverting 51155b63, We dont need two of three break statements after all

8 years agoPSR2 fixes for /settings
Marc Tobias Metten [Wed, 14 Sep 2016 01:50:18 +0000 (03:50 +0200)]
PSR2 fixes for /settings

8 years agoPSR2 fixes for /wikidata and /tests-php directories
Marc Tobias Metten [Wed, 14 Sep 2016 01:39:17 +0000 (03:39 +0200)]
PSR2 fixes for /wikidata and /tests-php directories

8 years agoPHP linter looks for phpcs.xml by default. Also removed a couple of exceptions that...
Marc Tobias Metten [Wed, 14 Sep 2016 01:23:43 +0000 (03:23 +0200)]
PHP linter looks for phpcs.xml by default. Also removed a couple of exceptions that didnt cause warnings

8 years agofix indentation and misc errors according to PSR2 coding style guide
Marc Tobias Metten [Wed, 14 Sep 2016 01:16:46 +0000 (03:16 +0200)]
fix indentation and misc errors according to PSR2 coding style guide

8 years agoPHP linter looks for phpcs.xml by default. Also removed a couple of exceptions that...
Marc Tobias Metten [Wed, 14 Sep 2016 01:15:46 +0000 (03:15 +0200)]
PHP linter looks for phpcs.xml by default. Also removed a couple of exceptions that didnt cause warnings

8 years agocase statement need : instead of ;. Added more breaks
Marc Tobias Metten [Wed, 14 Sep 2016 01:00:57 +0000 (03:00 +0200)]
case statement need : instead of ;. Added more breaks

8 years agoUI: viewbox parameter was set in wrong parameter order
Marc Tobias Metten [Tue, 13 Sep 2016 12:41:56 +0000 (14:41 +0200)]
UI: viewbox parameter was set in wrong parameter order

8 years agoMerge pull request #524 from mtmail/PSR2-function-declarations
Sarah Hoffmann [Sun, 11 Sep 2016 10:07:35 +0000 (12:07 +0200)]
Merge pull request #524 from mtmail/PSR2-function-declarations

fix function declaration errors according to PSR2 coding style guide

8 years agofix function declaration errors according to PSR2 coding style guide
Marc Tobias Metten [Sun, 11 Sep 2016 03:22:51 +0000 (05:22 +0200)]
fix function declaration errors according to PSR2 coding style guide

8 years agocode style definitions: we no longer use tabs
Marc Tobias Metten [Sun, 11 Sep 2016 03:21:51 +0000 (05:21 +0200)]
code style definitions: we no longer use tabs

8 years agoadd PHP code-sniffer to installation instructions (marked optional)
Marc Tobias Metten [Sun, 11 Sep 2016 03:21:15 +0000 (05:21 +0200)]
add PHP code-sniffer to installation instructions (marked optional)

8 years agoMerge pull request #522 from mtmail/PSR2-arrays
Sarah Hoffmann [Sat, 10 Sep 2016 21:35:25 +0000 (23:35 +0200)]
Merge pull request #522 from mtmail/PSR2-arrays

fix array-related errors according to PSR2 coding style guide

8 years agomake apt-get noninteractive. Also fixes the grub error state
marc tobias [Wed, 7 Sep 2016 14:08:30 +0000 (15:08 +0100)]
make apt-get noninteractive. Also fixes the grub error state

grub complains about disc unique identifier having changed

8 years agofix array-related errors according to PSR2 coding style guide
marc tobias [Sat, 10 Sep 2016 19:10:52 +0000 (21:10 +0200)]
fix array-related errors according to PSR2 coding style guide

8 years agobracket spacing for if/else/for/foreach/while/switch according to PSR2 standard
marc tobias [Thu, 8 Sep 2016 01:16:22 +0000 (02:16 +0100)]
bracket spacing for if/else/for/foreach/while/switch according to PSR2 standard

8 years agoMerge branch 'delete-us-postcode-without-name' of https://github.com/mtmail/Nominatim
Sarah Hoffmann [Mon, 5 Sep 2016 21:09:32 +0000 (23:09 +0200)]
Merge branch 'delete-us-postcode-without-name' of https://github.com/mtmail/Nominatim

8 years agoadapt coding style for new spaces-only policy
Sarah Hoffmann [Mon, 5 Sep 2016 20:13:08 +0000 (22:13 +0200)]
adapt coding style for new spaces-only policy

8 years agotabs-to-spaces
Marc Tobias Metten [Sun, 4 Sep 2016 01:19:48 +0000 (03:19 +0200)]
tabs-to-spaces

8 years agoone US postcode has no name. Unable to find secondary source what it would have been
Marc Tobias Metten [Sun, 4 Sep 2016 00:15:51 +0000 (02:15 +0200)]
one US postcode has no name. Unable to find secondary source what it would have been

8 years agoMerge pull request #498 from mtmail/move-mouse-position-info-on-map
Sarah Hoffmann [Wed, 24 Aug 2016 20:19:48 +0000 (22:19 +0200)]
Merge pull request #498 from mtmail/move-mouse-position-info-on-map

HTML map: new button -show map bounds-

8 years agoMerge pull request #508 from mtmail/addtype-in-installation.md
Sarah Hoffmann [Wed, 24 Aug 2016 06:49:45 +0000 (08:49 +0200)]
Merge pull request #508 from mtmail/addtype-in-installation.md

typo in Installation.md

8 years agoHTML map: new button -show map bounds- in top right corner
Marc Tobias Metten [Wed, 24 Aug 2016 02:21:28 +0000 (04:21 +0200)]
HTML map: new button -show map bounds- in top right corner

8 years agoUpdate Installation.md
mtmail [Tue, 23 Aug 2016 23:45:36 +0000 (01:45 +0200)]
Update Installation.md

trivial typo: AddTpe => AddType

8 years agoMerge remote-tracking branch 'upstream/master' into move-mouse-position-info-on-map
Marc Tobias Metten [Tue, 23 Aug 2016 22:03:40 +0000 (00:03 +0200)]
Merge remote-tracking branch 'upstream/master' into move-mouse-position-info-on-map

8 years agoMerge pull request #504 from lonvia/parameter-parser-class
Sarah Hoffmann [Tue, 23 Aug 2016 19:57:06 +0000 (21:57 +0200)]
Merge pull request #504 from lonvia/parameter-parser-class

factor out parameter parsing into its own class

8 years agoMerge pull request #506 from mtmail/primary-vagrant-vm
Sarah Hoffmann [Mon, 22 Aug 2016 07:41:46 +0000 (09:41 +0200)]
Merge pull request #506 from mtmail/primary-vagrant-vm

specify ubuntu as primary Vagrant VM

8 years agospecify ubuntu as primary Vagrant VM
marc tobias [Mon, 22 Aug 2016 03:47:26 +0000 (05:47 +0200)]
specify ubuntu as primary Vagrant VM

8 years agofactor out parameter parsing into its own class
Sarah Hoffmann [Sun, 31 Jul 2016 19:04:33 +0000 (21:04 +0200)]
factor out parameter parsing into its own class

Allows to use the parsing functions in website/search.php and
utils/query.php as well.

8 years agoupdate tests for newer planet
Sarah Hoffmann [Fri, 19 Aug 2016 21:57:23 +0000 (23:57 +0200)]
update tests for newer planet

8 years agodocs: give recomendations about flatnode file size
Sarah Hoffmann [Wed, 10 Aug 2016 20:02:10 +0000 (22:02 +0200)]
docs: give recomendations about flatnode file size

closes #501

8 years agofix merge error
Sarah Hoffmann [Fri, 5 Aug 2016 20:34:42 +0000 (22:34 +0200)]
fix merge error

8 years agoMerge remote-tracking branch 'upstream/master' into cmake-port
Sarah Hoffmann [Fri, 5 Aug 2016 19:18:42 +0000 (21:18 +0200)]
Merge remote-tracking branch 'upstream/master' into cmake-port

8 years agomark checkpoint_segments parameter as deprecated
Sarah Hoffmann [Thu, 4 Aug 2016 20:17:05 +0000 (22:17 +0200)]
mark checkpoint_segments parameter as deprecated

Postgresql 9.5 has checkpoint_segments removed and fails to start
if the options is given. Adds a comment to that effect.

Fixes #494.

8 years agoMerge pull request #499 from mtmail/travis-ci
Sarah Hoffmann [Wed, 3 Aug 2016 06:35:32 +0000 (08:35 +0200)]
Merge pull request #499 from mtmail/travis-ci

Travis ci setup - tests pass

8 years agoMerge remote-tracking branch 'upstream/master' into travis-ci
Marc Tobias Metten [Tue, 2 Aug 2016 23:10:30 +0000 (01:10 +0200)]
Merge remote-tracking branch 'upstream/master' into travis-ci

8 years agotravis-ci: enable river tests again, numpy package was missing
Marc Tobias Metten [Tue, 2 Aug 2016 22:57:30 +0000 (00:57 +0200)]
travis-ci: enable river tests again, numpy package was missing

8 years agotravis-ci: enable river tests again, numpy package was missing
Marc Tobias Metten [Tue, 2 Aug 2016 22:54:49 +0000 (00:54 +0200)]
travis-ci: enable river tests again, numpy package was missing

8 years agoupdate paths in vagrant docs
Sarah Hoffmann [Tue, 2 Aug 2016 20:55:13 +0000 (22:55 +0200)]
update paths in vagrant docs

8 years agoMerge pull request #497 from lonvia/forbid-execution-from-sourcedir
Sarah Hoffmann [Tue, 2 Aug 2016 20:42:20 +0000 (22:42 +0200)]
Merge pull request #497 from lonvia/forbid-execution-from-sourcedir

fail on execution of util scripts from source directory

8 years agoMerge pull request #476 from mtmail/travis-ci
mtmail [Mon, 1 Aug 2016 00:03:45 +0000 (02:03 +0200)]
Merge pull request #476 from mtmail/travis-ci

travis-ci setup

8 years agoHTML map: new button -show map bounds-
Marc Tobias Metten [Sun, 31 Jul 2016 23:34:03 +0000 (01:34 +0200)]
HTML map: new button -show map bounds-

8 years agofail on execution of util scripts from source directory
Sarah Hoffmann [Sun, 31 Jul 2016 20:55:38 +0000 (22:55 +0200)]
fail on execution of util scripts from source directory

Utils scripts must be run from the build directory to make sure
we get the right paths. Rename the settings file in source and
replace the original one with an error, so that scripts
fail with an understandable error message when run from the
source directory.

8 years agotravis: exclude poldi, waterway tests
Marc Tobias Metten [Sun, 31 Jul 2016 00:33:47 +0000 (02:33 +0200)]
travis: exclude poldi, waterway tests

8 years agotravis: exclude poldi, waterway tests
Marc Tobias Metten [Sun, 31 Jul 2016 00:18:27 +0000 (02:18 +0200)]
travis: exclude poldi, waterway tests

8 years agotravis: exclude poldi, waterway tests
Marc Tobias Metten [Sun, 31 Jul 2016 00:17:28 +0000 (02:17 +0200)]
travis: exclude poldi, waterway tests

8 years agoMerge remote-tracking branch 'upstream/master' into travis-ci
Marc Tobias Metten [Sat, 30 Jul 2016 19:53:27 +0000 (21:53 +0200)]
Merge remote-tracking branch 'upstream/master' into travis-ci

8 years agoMerge pull request #490 from lonvia/streamline-class-interfaces
Sarah Hoffmann [Wed, 27 Jul 2016 18:56:10 +0000 (20:56 +0200)]
Merge pull request #490 from lonvia/streamline-class-interfaces

Code cleanup for geocode classes

8 years agoremove unused functions in Geocode
Sarah Hoffmann [Tue, 26 Jul 2016 21:01:42 +0000 (23:01 +0200)]
remove unused functions in Geocode

8 years agocleanup interface of PlaceLookup
Sarah Hoffmann [Mon, 25 Jul 2016 21:55:06 +0000 (23:55 +0200)]
cleanup interface of PlaceLookup

Move lookup parameters (place id, type, frac etc.) from members
to parameters for lookup().

8 years agoremove unnecessary local variable
Sarah Hoffmann [Mon, 25 Jul 2016 21:02:30 +0000 (23:02 +0200)]
remove unnecessary local variable

8 years agorefactor ReverseGeocode
Sarah Hoffmann [Mon, 25 Jul 2016 20:44:01 +0000 (22:44 +0200)]
refactor ReverseGeocode

- remove unused functions and members
- move coordinates from being members to being parameters of lookup()

8 years agofix typos and grammar in installation instructions
Sarah Hoffmann [Tue, 26 Jul 2016 18:38:07 +0000 (20:38 +0200)]
fix typos and grammar in installation instructions

8 years agoMerge pull request #487 from lonvia/unify-reverse
Sarah Hoffmann [Mon, 25 Jul 2016 20:15:28 +0000 (22:15 +0200)]
Merge pull request #487 from lonvia/unify-reverse

Remove duplicate reverse geocoding code

8 years agoremove duplicate reverse geocoding code
Sarah Hoffmann [Sun, 24 Jul 2016 21:58:39 +0000 (23:58 +0200)]
remove duplicate reverse geocoding code

Geocode now uses ReverseGeocode directly. Note that it currently
cannot support any interpolations, neither OSM nor Tiger. But
neither did the previous version.

8 years agoadapt Tiger reverse test to new output format
Sarah Hoffmann [Sun, 24 Jul 2016 21:58:21 +0000 (23:58 +0200)]
adapt Tiger reverse test to new output format

8 years agoremove IP blocking and rate-limiting code
Sarah Hoffmann [Mon, 18 Jul 2016 12:41:09 +0000 (14:41 +0200)]
remove IP blocking and rate-limiting code

Closes #472.

8 years agoMerge pull request #486 from IrlJidel/patch-1
Sarah Hoffmann [Sat, 16 Jul 2016 08:09:09 +0000 (10:09 +0200)]
Merge pull request #486 from IrlJidel/patch-1

pgsqlRunPartitionScript needs global $aCMDResult

8 years agopgsqlRunPartitionScript needs global $aCMDResult
IrlJidel [Thu, 14 Jul 2016 18:49:58 +0000 (19:49 +0100)]
pgsqlRunPartitionScript needs global $aCMDResult

function pgsqlRunPartitionScript  was missing global $aCMDResult

setup was failing with

...
PHP Notice:  Undefined variable: aCMDResult in /home/roles/nominatim/app/Nominatim/build/utils/setup.php on line 768
NOTICE:  type "nearplace" does not exist, skipping
..
ERROR:  relation "location_area_large_0" already exists
ERROR: pgsql returned with error code (3)
pgsql returned with error code (3)
Command exited with non-zero status 255

8 years agohide address parts that are linked place nodes
Sarah Hoffmann [Mon, 11 Jul 2016 21:29:45 +0000 (23:29 +0200)]
hide address parts that are linked place nodes

Quick and very dirty fix for github issue #483.

8 years agotravis-ci setup, some tests fails
Marc Tobias Metten [Tue, 21 Jun 2016 21:42:36 +0000 (23:42 +0200)]
travis-ci setup, some tests fails

8 years agoallow coordinates in query only with name or classtype
Sarah Hoffmann [Wed, 15 Jun 2016 20:39:21 +0000 (22:39 +0200)]
allow coordinates in query only with name or classtype

Coordinates with country or housenumber only do not make much
sense. Currently these combination result in queries that
require a sequential scan of search_name and normally time
out before yielding any results.

fixes #462

8 years agoallow coordinates in query only with name or classtype
Sarah Hoffmann [Wed, 15 Jun 2016 20:39:21 +0000 (22:39 +0200)]
allow coordinates in query only with name or classtype

Coordinates with country or housenumber only do not make much
sense. Currently these combination result in queries that
require a sequential scan of search_name and normally time
out before yielding any results.

fixes #462

8 years agofix links to documentation in README
Sarah Hoffmann [Tue, 14 Jun 2016 21:11:14 +0000 (23:11 +0200)]
fix links to documentation in README

8 years agomore instructions for Tiger imports
Sarah Hoffmann [Tue, 14 Jun 2016 19:44:18 +0000 (21:44 +0200)]
more instructions for Tiger imports

8 years agoreverse do not downgrade tiger and interpolation results
Sarah Hoffmann [Tue, 14 Jun 2016 19:38:03 +0000 (21:38 +0200)]
reverse do not downgrade tiger and interpolation results

Also fix the type that is returned for Tiger data.

Fixes #470

8 years agoMerge pull request #469 from lonvia/refactor-php
Sarah Hoffmann [Mon, 13 Jun 2016 18:13:38 +0000 (20:13 +0200)]
Merge pull request #469 from lonvia/refactor-php

Some refactoring of website php

8 years agoadd instructions to enable use of Tiger data
Sarah Hoffmann [Mon, 13 Jun 2016 18:07:57 +0000 (20:07 +0200)]
add instructions to enable use of Tiger data

8 years agofix more syntax errors in error functions
Sarah Hoffmann [Sun, 12 Jun 2016 21:25:47 +0000 (23:25 +0200)]
fix more syntax errors in error functions

8 years agoallow parameters to be empty
Sarah Hoffmann [Sun, 12 Jun 2016 21:22:14 +0000 (23:22 +0200)]
allow parameters to be empty

Consider empty parameters as unset and use the default. Simplifies
use in forms.

8 years agofix syntax errors and update tests
Sarah Hoffmann [Sun, 12 Jun 2016 20:33:37 +0000 (22:33 +0200)]
fix syntax errors and update tests

Some of the tests with bad parameters now return a HTTP 400.

8 years agouse chksql everywhere in lib/
Sarah Hoffmann [Sun, 12 Jun 2016 12:58:05 +0000 (14:58 +0200)]
use chksql everywhere in lib/

Replaces manual PEAR error checks and adds the chksql wrapper
where the error checks were still missing.

8 years agointroduce chksql function for website code and move other fail functions
Sarah Hoffmann [Sun, 12 Jun 2016 12:34:57 +0000 (14:34 +0200)]
introduce chksql function for website code and move other fail functions

The default error screen now reports the full SQL even when not
in debug mode as this message is often more helpful than our
custom error message.

8 years agofactor out link formatting function and osm type translation
Sarah Hoffmann [Sun, 12 Jun 2016 10:39:09 +0000 (12:39 +0200)]
factor out link formatting function and osm type translation

8 years agoupdate links to OSM objects
Sarah Hoffmann [Sun, 12 Jun 2016 07:26:58 +0000 (09:26 +0200)]
update links to OSM objects

/browse/ is no longer necesary in the URL

8 years agoremove now unused bAsPoints in reverse API
Sarah Hoffmann [Sat, 11 Jun 2016 21:27:21 +0000 (23:27 +0200)]
remove now unused bAsPoints in reverse API

8 years agointroduce accessor function for URL parameter
Sarah Hoffmann [Sat, 11 Jun 2016 21:07:06 +0000 (23:07 +0200)]
introduce accessor function for URL parameter

These functions take care of type conversion and check that
the parameters contain legal values. The API now returns a
Bad Request error if the format is wrong.

8 years agopolygons.php: print total number of broken polygons
Sarah Hoffmann [Fri, 10 Jun 2016 21:58:50 +0000 (23:58 +0200)]
polygons.php: print total number of broken polygons

8 years agoremove dead code
Sarah Hoffmann [Fri, 10 Jun 2016 21:54:28 +0000 (23:54 +0200)]
remove dead code